View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default 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?