+ Reply to Thread
Results 1 to 3 of 3

Type Mismatch Errors...

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

    Type Mismatch Errors...

    I really don't understand what's wrong with my types.

    I'm using Option Explicit declarations.
    I have a string (libstr) defined as a public variable.
    I have a secondary sub that is being called by my main sub, and this secondary sub alters libstr and sends it to another function.
    This third function returns a string, based on libstr.

    The applicable code should be this:

    Please Login or Register  to view this content.
    The error takes place in rateAssign, on the line where the function LibAdj is called.

    Any help at all would be encouraging.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Yellephant,

    You are assigning a cell's value to libstr. A cell's value can be a date, a number, null, string, text, or empty. The code will work fine as long as all the cells values in the range are strings.

    You could test the cell's value before assigning it to libstr to avoid an error, or simply use the Text property of the cell.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    05-21-2007
    Posts
    79
    Ah yes, I see the issue. The more I become familiar with VBA syntax and methods, the more I am realizing there is to pay attention to under the surface.

    Thanks much for the help!

+ 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