View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
paperclip[_3_] paperclip[_3_] is offline
external usenet poster
 
Posts: 1
Default VBScript to prompt Save on Cancel click


Bob Phillips Wrote:
Private Sub cmdCancel_Click()

If MsgBox ("Save document?,vbYesNo) =vbYes Then
ActiveWorkbooks.Save
End If

Unload Me

End Sub


--
HTH

Bob Phillips


Hey Bob!

Thanks that solved half of my problem, althouth there some major typos
in your post that I had to figure out on my own to get it to work -
this is what I changed it to:


Code:
--------------------
Private Sub cmdCancel_Click()

If MsgBox("Save document?", vbYesNo) = vbYes Then

ActiveWorkbook.Save

Unload Me

Else

Unload Me

End If

End Sub
--------------------


That works fine, but how can I get a dialog box to make them choose an
alternate save location aside from just saving where ever the file
already is. I want the user to be able to choose a location that would
be more convient for them.

Any further ideas on this would be great!


--
paperclip
------------------------------------------------------------------------
paperclip's Profile: http://www.excelforum.com/member.php...o&userid=32219
View this thread: http://www.excelforum.com/showthread...hreadid=566739