help when mailing

E

eluehmann

I used some of this code in a workbook

http://www.rondebruin.nl/mail/folder1/mail1.htm

When I execute it automatically saves a copy.

I do not want the automatic save, but rather I want the save as box t
open and let me save wherever I want, and then, after I hit OK, execut
the rest of the code. Any help would be appreciated.

-Eri
 
D

David McRitchie

First of all, you want to correct concept by changing the format
so that the year appears before the month before the day.


wb1.SaveCopyAs wbname

change to

dim sav_wbname as string
sav_wbname = application.InputBox( _
"Your chance to override the following as saved filename",
"Supply override", wbname, , , ,1)
if sav_wbname = "" then
MsgBox("terminated by your command")
exit sub ' or goto termination label
end if
wb1.SaveCopyAs sav_wbname

HTH, David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
 
D

David McRitchie

First thing you should do is change the code so the
filename is created with a name incorporating
year before month before day of month so that you can look
at the directory ordered by name.


Dim sav_wbname As String
sav_wbname = Application.InputBox( _
"Your chance to override the following as " _
& Chr(10) & " the saved filename", _
"Supply override", wbname)
If sav_wbname = "" Then
MsgBox ("terminated by your command")
Exit Sub ' or goto termination label
End If
' use sav_wbname for the output file

--
 
Top