+ Reply to Thread
Results 1 to 4 of 4

Compile error on variable (not defined)

  1. #1
    Forum Contributor
    Join Date
    12-26-2006
    Posts
    189

    Compile error on variable (not defined)

    Hi,

    I have the following problem with the following code:

    Please Login or Register  to view this content.
    In my computer it runs perfectly, but in other, reports an error when it reaches: "fileSaveName". The error is: "Compile error in hiden module:This workbook".

    I've concluded that it breaks when it founds a variable not defined. I didn't put "Object explicit" at the beginning, so it shouldn't be a problem....

    The strange thing is that in my computer it works fine.

    Anyone can help me?

  2. #2
    Forum Contributor
    Join Date
    12-26-2006
    Posts
    189

    Unhappy

    Hi there!

    Can anyone help me on this?

    I can not overcome this problem...

  3. #3
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning mqdias

    Could it be that the machines that macro fails on are running XL2000 or prior? I seem to remember that GetOpenFilename (and it's saving counterpart GetSaveAsFilename) are only available from XL2002 onwards?

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  4. #4
    Forum Contributor
    Join Date
    12-26-2006
    Posts
    189
    Dominic, thank you soo much for the reply!

    In fact, the computers where i found this problem, both have Excel 2003 Version.

    The reported error is related to "fileToOpen" variable.

+ 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