+ Reply to Thread
Results 1 to 3 of 3

Run Time Error

  1. #1
    Registered User
    Join Date
    12-05-2012
    Location
    victoria
    MS-Off Ver
    Excel 2010
    Posts
    55

    Run Time Error

    Hey guys,

    In the code below, the line that says Z=... gives me a runtime error 13, type mismatch but if I switch the Z to R in that line and the one below then it works. why is that since Z and R are both integers??

    Please Login or Register  to view this content.
    Last edited by arlu1201; 12-06-2012 at 02:54 PM. Reason: Corrected code tags.

  2. #2
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Run Time Error

    Hi -
    Please Login or Register  to view this content.
    from the declaration above, data type for Z is not the same as R, R is a variant

    Regards,
    Event

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646
    z is declared as an Integer but you try and assign a text value to it.

    If you want to use z declare it as String.
    If posting code please use code tags, see here.

+ 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