Log in

View Full Version : Solved: SaveAs Dialog Issues



LondonVirus
07-12-2010, 09:18 PM
MS Word Version 2003.

I am trying to call the save as box from a form, which seems to work fine as following...

Application.Dialogs(wdDialogFileSaveAs).Show

But what I would also like to do is...

Hide the form at on load of the dialog, which I am doing as following...

Unload Me

And re load the form should the user click the cancel button on the SaveAs dialog, and this is where my problems start, I wanted to use the folowing code...

If Application.Dialogs(wdDialogFileSaveAs).Show = 0 Then
load UserForm1

But at this point the code just re-shows the SaveAs dialog, and if I press the cancel button again the code stops running

Please help... :help

But when

gmaxey
07-13-2010, 04:34 AM
Private Sub CommandButton1_Click()
Me.Hide
With Application.Dialogs(wdDialogFileSaveAs)
If .Show = 0 Then
Me.Show
Else
'Do whatever
End If
End With
End Sub