+ Reply to Thread
Results 1 to 3 of 3

type mismatch error in code

  1. #1
    Registered User
    Join Date
    08-06-2008
    Location
    Los Angeles
    Posts
    10

    type mismatch error in code

    I gave this coding thing a stab and came up with this code

    Please Login or Register  to view this content.
    unfortunately, I get an error "type mismatch" and choosing the debug option directs me to this line:

    Please Login or Register  to view this content.
    Oh, with the help of a friend I figured out what happened:

    "and" generally can't be placed in anything within a "then" statement. Instead I should've followed this syntax:

    Please Login or Register  to view this content.
    mods: feel free to delete this if this knowledge is too basic. I don't know a lick of this coding business and made an easy goof. Thanks.
    Last edited by strikeofdawn; 08-08-2008 at 08:32 PM.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Put the 2 commands on seperate lines

    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    08-06-2008
    Location
    Los Angeles
    Posts
    10
    my, y'all are quick on the draw! thanks. I love this place.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1