Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save Excel Workbook Question
I have created a button which saves a workbook as a specified name. The code
is as follows: Private Sub CommandButton1_Click() Dim sFileName As Variant With Application.Dialogs(xlDialogSaveAs) .Show ("CurrentVersion") End With End Sub What do I need to do to save the file automatically as a value in Cell A1, instead of "CurrentVersion" and without having "SAVE AS" Dialogue Box displaying? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save Excel Workbook Question
Try this:
Private Sub CommandButton1_Click() Dim sFileName As Variant sFileName = Worksheets("Sheet1").Range("A1") 'sFileName needs to include the path 'you can add it if necessary with the following sFileName = "C:\temp\" & sFileName ActiveWorkbook.SaveAs (sFileName) End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
My CD won't let me save my Excel workbook on them? | Excel Discussion (Misc queries) | |||
Excel workbook will not save | Excel Discussion (Misc queries) | |||
Simple question about FORM / SAVE & EXCEL | Excel Programming | |||
save excel workbook | Excel Discussion (Misc queries) | |||
Using interop.excel to open a workbook, the workbook doesn't ask to save changes. | Excel Programming |