ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveWorkbook.SaveAs Returns (https://www.excelbanter.com/excel-programming/389678-activeworkbook-saveas-returns.html)

BHatMJ

ActiveWorkbook.SaveAs Returns
 
Can anyone point me in the direction of expected returns when using
ActiveWorkbook.SaveAs (or Open). How do I capture a "Cancel" or "No"
selection?

Rody Meulman[_5_]

ActiveWorkbook.SaveAs Returns
 
closemode? vbno?

"BHatMJ" schreef in bericht
...
Can anyone point me in the direction of expected returns when using
ActiveWorkbook.SaveAs (or Open). How do I capture a "Cancel" or "No"
selection?




BHatMJ

ActiveWorkbook.SaveAs Returns
 
Sorry, I'm not exactly sure what you're asking. Specifically, I want to know
what I need to add to the following subroutine in Excel. If "temp.xls"
already exists, how do you capture the "Cancel" or "No" response on the
dialog box that asks if you want to replace the existing file.

sub test()
ActiveWorkbook.SaveAs ("temp.xls")
end sub


"Rody Meulman" wrote:

closemode? vbno?

"BHatMJ" schreef in bericht
...
Can anyone point me in the direction of expected returns when using
ActiveWorkbook.SaveAs (or Open). How do I capture a "Cancel" or "No"
selection?





Chip Pearson

ActiveWorkbook.SaveAs Returns
 
SaveAs doesn't return anything. It is a sub, not a function. If you really
need to know the reply from the user, the best way is to intercept the
BeforeSave event in the ThisWorkbook module, test the SaveAsUI parameter,
and if that is True, set the Cancel parameter to True and put up your own
dialog to handle saving.



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)


"BHatMJ" wrote in message
...
Sorry, I'm not exactly sure what you're asking. Specifically, I want to
know
what I need to add to the following subroutine in Excel. If "temp.xls"
already exists, how do you capture the "Cancel" or "No" response on the
dialog box that asks if you want to replace the existing file.

sub test()
ActiveWorkbook.SaveAs ("temp.xls")
end sub


"Rody Meulman" wrote:

closemode? vbno?

"BHatMJ" schreef in bericht
...
Can anyone point me in the direction of expected returns when using
ActiveWorkbook.SaveAs (or Open). How do I capture a "Cancel" or "No"
selection?








All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com