View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default VBA-Excel. File-SaveAs

Ramesh

Not sure how your interoperability is working but Excel has a
WorkBook_BeforeSave() event that can detect if the user presses SaveAs as
opposed to Save. You can then stop the save and advise.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If SaveAsUI = False Then
MsgBox "You must use save as NOT save", vbExclamation + vbOKOnly
Cancel = True
End If
End Sub

Alternatively, your Excel file could be saved as a template (*.xlt). This
will always only allow a SaveAs

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


wrote in message
oups.com...
Hi All,

Iam calling Excel page in ASP using VB Script. After the Excel page is
loaded I want the user to SaveAs in different path.
How can I do it.

any help would be glad asap.

rgds

Ramesh