+ Reply to Thread
Results 1 to 4 of 4

Type Mismatch Errors...:Val() function

  1. #1
    Registered User
    Join Date
    05-21-2007
    Posts
    79

    Type Mismatch Errors...:Val() function

    I'm terrible with this error...

    I have an Variant array named Calcs3(), and I want to do this:

    Please Login or Register  to view this content.
    Calcs4 is also declared as a Variant array.

    It's my understanding that the Val() function takes a string and reads all of the numbers out of it. However, I keep getting a type mismatch error when I try to take Val("3.36%") or something like that. It just won't do it.

    All I want is 0.0336 to go into Calcs4(i,j).

    Thanks

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Looks like Val doesn't like converting strings with %. You might need to do this
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-21-2007
    Posts
    79
    Ah, that little check made things run like a dream. Many thanks, shg!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    You're very welcome.

+ 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