Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a button to Save As the workbook
Hi,
I would like to create a button that opens the Save As command - if possible? Thanks, Helen |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a button to Save As the workbook
Try:
Sub SaveAs() Dim flname As String Dim fullName As Variant Dim filter As String flname = "SaveName" filter = "Excel Files (*.xls), *.xls" fullName = Application.GetSaveAsFilename(flname, filter, , "MyFile") If fullName < False Then Application.DisplayAlerts = False ThisWorkbook.SaveAs fullName Application.DisplayAlerts = True End If End Sub Hope this helps Rowan Helen wrote: Hi, I would like to create a button that opens the Save As command - if possible? Thanks, Helen |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a button to Save As the workbook
Works great.
Thanks! Helen "Rowan Drummond" wrote in message ... Try: Sub SaveAs() Dim flname As String Dim fullName As Variant Dim filter As String flname = "SaveName" filter = "Excel Files (*.xls), *.xls" fullName = Application.GetSaveAsFilename(flname, filter, , "MyFile") If fullName < False Then Application.DisplayAlerts = False ThisWorkbook.SaveAs fullName Application.DisplayAlerts = True End If End Sub Hope this helps Rowan Helen wrote: Hi, I would like to create a button that opens the Save As command - if possible? Thanks, Helen |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a button to Save As the workbook
You're welcome.
Helen wrote: Works great. Thanks! Helen "Rowan Drummond" wrote in message ... Try: Sub SaveAs() Dim flname As String Dim fullName As Variant Dim filter As String flname = "SaveName" filter = "Excel Files (*.xls), *.xls" fullName = Application.GetSaveAsFilename(flname, filter, , "MyFile") If fullName < False Then Application.DisplayAlerts = False ThisWorkbook.SaveAs fullName Application.DisplayAlerts = True End If End Sub Hope this helps Rowan Helen wrote: Hi, I would like to create a button that opens the Save As command - if possible? Thanks, Helen |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a button to Save As the workbook
can you tell me why it saves then opens file it saved. works good but i need
to reopen file itwas saved from. have many formulas that need to be used.can we copy the woorkbook as a file and then do the other code I have in my existing woorkbook? this sets the woorkbookand sheets for next year. Any help appreciated Thanks Curt "Rowan Drummond" wrote: Try: Sub SaveAs() Dim flname As String Dim fullName As Variant Dim filter As String flname = "SaveName" filter = "Excel Files (*.xls), *.xls" fullName = Application.GetSaveAsFilename(flname, filter, , "MyFile") If fullName < False Then Application.DisplayAlerts = False ThisWorkbook.SaveAs fullName Application.DisplayAlerts = True End If End Sub Hope this helps Rowan Helen wrote: Hi, I would like to create a button that opens the Save As command - if possible? Thanks, Helen |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a button to Save As the workbook
A thought I guess what needs to happen is to copy the file with anew name
then procede with other code. need to study more new student at 68. having a good time with it. Thanks for any help Curt "Rowan Drummond" wrote: You're welcome. Helen wrote: Works great. Thanks! Helen "Rowan Drummond" wrote in message ... Try: Sub SaveAs() Dim flname As String Dim fullName As Variant Dim filter As String flname = "SaveName" filter = "Excel Files (*.xls), *.xls" fullName = Application.GetSaveAsFilename(flname, filter, , "MyFile") If fullName < False Then Application.DisplayAlerts = False ThisWorkbook.SaveAs fullName Application.DisplayAlerts = True End If End Sub Hope this helps Rowan Helen wrote: Hi, I would like to create a button that opens the Save As command - if possible? Thanks, Helen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Comman Button to Save Worksheet as Workbook | Excel Discussion (Misc queries) | |||
Button/Script to create a new workbook from a current one. | Excel Worksheet Functions | |||
How to create command button to save the dates and time | Excel Discussion (Misc queries) | |||
How can I create a button to save one worksheet into a new workshe | Excel Discussion (Misc queries) | |||
Command Button to Save As Workbook... | Excel Programming |