Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As
Hi,
XL2003 I am trying to do a SaveAs according to inputs entered by the op. Two questions are asked, answers are Ans1 and Ans2 If I use: ActiveWorkbook.SaveAs Filename:=Ans1 & " " & Ans2 Then the workbook is saved correctly, but to the default location. I want the op to be able to choose the location, but for the constructed filename to be already present in the SaveAs dialogue box. I tried: Application.GetSaveAsFilename (Ans1 & " " & Ans2) which looked promising, allowing me to select the destination. But after clicking Save, although the SaveAs dialogue box closed and the macro resumed, the workbook was not actually saved. Is there a syntax that will do what I want? Thanks in advance. Regards - Dave. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As
Dave, I believe that when you call the SaveAs dialog box with VBA that it
only allows you to return a path and filename. It doesn't do anything with it. So, you need to add a line of code that executes after you click OK save the ActiveWorkbook. "Dave" wrote: Hi, XL2003 I am trying to do a SaveAs according to inputs entered by the op. Two questions are asked, answers are Ans1 and Ans2 If I use: ActiveWorkbook.SaveAs Filename:=Ans1 & " " & Ans2 Then the workbook is saved correctly, but to the default location. I want the op to be able to choose the location, but for the constructed filename to be already present in the SaveAs dialogue box. I tried: Application.GetSaveAsFilename (Ans1 & " " & Ans2) which looked promising, allowing me to select the destination. But after clicking Save, although the SaveAs dialogue box closed and the macro resumed, the workbook was not actually saved. Is there a syntax that will do what I want? Thanks in advance. Regards - Dave. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As
To clarify:
fName = Application.GetSaveAs Filename:=Ans1 & " " & Ans2 fName.Save "Dave" wrote: Hi, XL2003 I am trying to do a SaveAs according to inputs entered by the op. Two questions are asked, answers are Ans1 and Ans2 If I use: ActiveWorkbook.SaveAs Filename:=Ans1 & " " & Ans2 Then the workbook is saved correctly, but to the default location. I want the op to be able to choose the location, but for the constructed filename to be already present in the SaveAs dialogue box. I tried: Application.GetSaveAsFilename (Ans1 & " " & Ans2) which looked promising, allowing me to select the destination. But after clicking Save, although the SaveAs dialogue box closed and the macro resumed, the workbook was not actually saved. Is there a syntax that will do what I want? Thanks in advance. Regards - Dave. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As
Hi JLG,
Yes, that did it. Thanks. Regards - Dave. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
prompt user to save file as {desired_name} and save it to a variab | Excel Programming | |||
Disable save, save as, but allow save via command button | Excel Programming | |||
How to diasble save and save as menu but allow a save button | Excel Programming | |||
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: | Excel Programming |