Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to save a file
Dear all,
I want to place a button in a worksheet, which will ask for a filename, after the user input the filename, I want to save the file to a particular directory, how can I do that? I do not want to use the common dialog box. I want to use an inputbox which ask for filename, after the user input filename in inputbox, then I will immdeately save the file, what is the function to set the saving directory and what is the function to save(write) a excel file? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to save a file
Hi Hon123456,
Try something like: '================ Public Sub Tester() Dim WB As Workbook Dim SH As Worksheet Dim res As String Const sPath As String = "C:\aFolder\" '<<=== CHANGE Set WB = ActiveWorkbook '<<=== CHANGE res = InputBox("Please enter new file name") WB.SaveAs Filename:=sPath & res, _ FileFormat:=xlWorkbookNormal End Sub '<<================ Note that no error checking has been included. --- Regards, Norman "hon123456" wrote in message ps.com... Dear all, I want to place a button in a worksheet, which will ask for a filename, after the user input the filename, I want to save the file to a particular directory, how can I do that? I do not want to use the common dialog box. I want to use an inputbox which ask for filename, after the user input filename in inputbox, then I will immdeately save the file, what is the function to set the saving directory and what is the function to save(write) a excel file? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to save a file
Thanks for your help
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SAVE and SAVE AS options disappeared from the drop down FILE menu | Excel Discussion (Misc queries) | |||
Excell2003 (SP-1) File > Save and File > Save As.. grayed out | Excel Discussion (Misc queries) | |||
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 |