+ Reply to Thread
Results 1 to 3 of 3

Getting a mismatch on operator when testing for variant and string

  1. #1
    Registered User
    Join Date
    12-26-2011
    Location
    San Francisco
    MS-Off Ver
    Excel 2010
    Posts
    45

    Getting a mismatch on operator when testing for variant and string

    Pretty simple function and I apologize in advance for posting but I've been stuck for a while on something fairly simple.

    I'm getting type mismatch on the If statement below

    I'm calling a function here:


    Please Login or Register  to view this content.
    Here is the actual function I'm calling:

    Please Login or Register  to view this content.
    Range("sheetBehavior") is a one-dimensional range of sheet names

    I'm missing something simple here
    Last edited by BeefNoodleSoup; 04-09-2012 at 08:57 PM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Getting a mismatch on operator when testing for variant and string

    Hi

    1) you are missing the index on the 4th test.
    2) there seems to be a dim missing on the arrlistsheets
    3) you don't initialize the array arrlistsheets
    4) you don't index the array when bringing back the result of the function

    HTH

    rylo

  3. #3
    Registered User
    Join Date
    12-26-2011
    Location
    San Francisco
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Getting a mismatch on operator when testing for variant and string

    Thanks for catching number 1, that was my critical mistake!

    3 and 4 are actually unnecessary I've found.

+ 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