Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
save file
hi
instead of oBook.SaveAs("c:\datalog.xls"), how do i open up a dialog to save to a new excel file? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
save file
Hi Newbie,
I am also a newbie, so don't feel alone !! I have just used the code below which works fine, i am sure it is not the best, but it works. Critisism will be welcome. Sub SaveFile() ' ' Dim myValue As Variant myValue = Application.InputBox(prompt:="Please enter the file save name") ChDir "C:\Datalog\" ActiveWorkbook.SaveAs Filename:="C:\Datalog\" & myValue & ".xls", _ FileFormat:=xlNormal, CreateBackup:=False MsgBox "Your file hase been saved as: " & "(" & myValue & ".XLS) " & "in the datalog folder" Application.Quit End Sub Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
save file
Try something like
Dim FName As Variant FName = Application.GetOpenFilename("Excel files (*.xls),*.xls") If FName = False Then ' user clicked cancel Else ActiveWorkbook.SaveAs Filename:=FName End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "newbie" wrote in message ... hi instead of oBook.SaveAs("c:\datalog.xls"), how do i open up a dialog to save to a new excel file? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excell2003 (SP-1) File > Save and File > Save As.. grayed out | Excel Discussion (Misc queries) | |||
Save Excel file - prompts to save - no Volitile functions used | Excel Worksheet Functions | |||
Excel marcos firing on file save as but not file save | Excel Programming | |||
Save File to Another Directory, but not change Users File Save location | Excel Programming | |||
Save As - Multiple Sheets fails to save as text file | Excel Programming |