wdDialogSaveAs box doesn't show except on first run of macro

Joyner

Well-known Member
Joined
Nov 15, 2005
Messages
1,202
Hello, I am using excel 2003

I have the below code to call the Word save as dialog box. It works fine the first time it is used after opening Excel, but the dialod box doesn't show if the macro is run after that. To get it to work again, I have to close Excel, reopen and then rerun the macro. Also, if the document exists in the folder and I select "replace existing document" nothing happens (dialog boxes close, but the document doesn't save).


Any ideas why it would behave like this? Do I need some more robust code?


Thanks


With Dialogs(wdDialogFileSaveAs)
.Name = sFolder & sSaveFileName
.Show
End With
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top