Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is my code. The problem is with the saveas command. It doesnt work.
When i click the button i want it to ask where to save as, with the initial file name to be "proj". Any ideas? Private Sub CommandButton1_Click() Dim est As String, mgr As String, sls As String, build As String, _ proj As String, file As Variant build = builder mgr = manager sls = sales est = estimator proj = project file = proj & ".xls" Range("est") = UCase(est) Range("o_est") = UCase(est) Range("mgr") = UCase(mgr) Range("o_mgr") = UCase(mgr) Range("sales") = UCase(sls) Range("o_sales") = UCase(sls) Range("builder") = UCase(build) Range("o_builder") = UCase(build) If Residential = True Then Call reset_species End If Application.GetSaveAsFilename (file) Unload Me End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200702/1 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
GetSaveAsFilename allows you to get a filename from the user, but it does not
actually save the file. Replace this line: Application.GetSaveAsFilename (file) with these 2 lines: file = Application.GetSaveAsFilename (file) if file<"False" then application.saveas file "brownti via OfficeKB.com" wrote: Here is my code. The problem is with the saveas command. It doesnt work. When i click the button i want it to ask where to save as, with the initial file name to be "proj". Any ideas? Private Sub CommandButton1_Click() Dim est As String, mgr As String, sls As String, build As String, _ proj As String, file As Variant build = builder mgr = manager sls = sales est = estimator proj = project file = proj & ".xls" Range("est") = UCase(est) Range("o_est") = UCase(est) Range("mgr") = UCase(mgr) Range("o_mgr") = UCase(mgr) Range("sales") = UCase(sls) Range("o_sales") = UCase(sls) Range("builder") = UCase(build) Range("o_builder") = UCase(build) If Residential = True Then Call reset_species End If Application.GetSaveAsFilename (file) Unload Me End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200702/1 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That didnt quite work. It doesnt like the last part of it, application.
saveas file Vergel Adriano wrote: GetSaveAsFilename allows you to get a filename from the user, but it does not actually save the file. Replace this line: Application.GetSaveAsFilename (file) with these 2 lines: file = Application.GetSaveAsFilename (file) if file<"False" then application.saveas file Here is my code. The problem is with the saveas command. It doesnt work. When i click the button i want it to ask where to save as, with the initial [quoted text clipped - 23 lines] Unload Me End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200702/1 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
SaveAs is a method of the Workbook class, so it should be
ActiveWorkbook.SaveAs file On Feb 28, 4:20 pm, "brownti via OfficeKB.com" <u31540@uwe wrote: That didnt quite work. It doesnt like the last part of it, application. saveas file Vergel Adriano wrote: GetSaveAsFilename allows you to get a filename from the user, but it does not actually save the file. Replace this line: Application.GetSaveAsFilename (file) with these 2 lines: file = Application.GetSaveAsFilename (file) if file<"False" then application.saveas file Here is my code. The problem is with the saveas command. It doesnt work. When i click the button i want it to ask where to save as, with the initial [quoted text clipped - 23 lines] Unload Me End Sub -- Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/excel-programming/200702/1- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SaveAs - VBA | Excel Discussion (Misc queries) | |||
SaveAs - VBA | Excel Discussion (Misc queries) | |||
VBA SaveAs Value | Excel Discussion (Misc queries) | |||
Saveas | Excel Programming | |||
SaveAs | Excel Programming |