+ Reply to Thread
Results 1 to 3 of 3

FileSaveAs: cell reference for file Name thinks it's EMPTY when it is not??? Excel 2010

  1. #1
    Registered User
    Join Date
    08-08-2010
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    85

    FileSaveAs: cell reference for file Name thinks it's EMPTY when it is not??? Excel 2010

    Hi

    Very strange goings on with my excel. 99% of the time this marco works, but sometimes it does not and I can't figure out why.

    I have a File/Save As function that references cell A1 to get the pre-determined file name... but sometimes it doesn't work...

    I set up a test to see if Excel really thinks that cell is empty (see below) and it doesn't. When I step through the code, it shows the name....

    Please Login or Register  to view this content.

    But, when it gets to the FileSaveName code, it shows as empty and when the FileSave dialogue box opens, there is no pre-filled name.

    Please Login or Register  to view this content.
    I tried setting the a variable to catch the name and inserting that after InitialFileName, but that didn't work either. It will catch it in the variable and pass it into a Message Box fine, but NOT pass it in the File/Save As code....

    again,,, this macro works 99% of the time... then suddenly... it does this?!

    Any ideas?

  2. #2
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913
    On top of the code insert Dim FileSaveName As String

  3. #3
    Registered User
    Join Date
    08-08-2010
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: FileSaveAs: cell reference for file Name thinks it's EMPTY when it is not??? Excel 201

    Thanks so much!!!

+ 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