+ Reply to Thread
Results 1 to 3 of 3

Getting file name "False.xlsm" when I click 'Cancel' on the 'Save as' window

  1. #1
    Registered User
    Join Date
    11-26-2013
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2010
    Posts
    20

    Question Getting file name "False.xlsm" when I click 'Cancel' on the 'Save as' window

    Hi, guys. I am facing a problem and I need some help, please.

    I have a workbook with a macro that prompts the user to enter a value in D1 and when he does it, a 'Save as' window automatically appears to save the file as a new one. That part works fine. The problem is when the user clicks the 'Cancel' button, it still saves a file named 'False' in the selected directory.

    How do I avoid this?

    This is the piece of code to save the workbook as a new one:

    Please Login or Register  to view this content.
    Thank you so much.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Getting file name "False.xlsm" when I click 'Cancel' on the 'Save as' window

    Hi, LewisM,

    when you cancel the varibale holds the False for Cancel so you would need to change the a code a bit and use an If-Function lieke this
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    11-26-2013
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Getting file name "False.xlsm" when I click 'Cancel' on the 'Save as' window

    Hi, HaHoBe. Thanks for your reply!

    Working like a charm.

    I'm really very grateful for your help, thank you!
    Last edited by LewisM; 02-27-2014 at 03:18 PM. Reason: I got HaHoBe's name wrong. >.<

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to enable user to click "cancel" if file name exists when saving as...
    By TBO in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-31-2014, 02:22 PM
  2. Replies: 2
    Last Post: 10-04-2013, 10:12 AM
  3. VBA - IE - click on "Open" in an internet explorer "file download" window
    By victoire in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-22-2013, 07:08 AM
  4. How to click "SAVE" to save a new file with file name derived from a cell?
    By vettenfun in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 09-29-2011, 12:21 PM
  5. [SOLVED] Stop code from running when I click "Cancel"
    By Dean in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-01-2006, 08:40 PM

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