Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get you.
How about something like this: Option Explicit Sub testme01() Dim SaveName As Variant Dim qrPath As String qrPath = "C:\my documents\excel\test\" SaveName = qrPath & ActiveCell.Value & " - " & _ ActiveCell.Offset(-3, 2).Value & " Quote" SaveName = Application.GetSaveAsFilename _ (InitialFileName:=SaveName, filefilter:="Excel Files, *.xls") If SaveName = False Then MsgBox "Please try later" 'user hit cancel Else Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:=SaveName, _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Application.DisplayAlerts = True End If End Sub I used my own folder and changed SaveName to a variant--it can return False if the user hits the cancel button. wrote: Hi, This works, but it doesn't stop and let me update the filename. I'm okay on the activecell since I move to it just before. The filename is always correct, except I can't add to it. You see the file name is "'company' - 'quote#' quote.xls", (were company and quote# come nicely from cells), but since the customer often does several quotes the same day for the same company they want to be able to add something in the middle, i.e. "'company' 'stuff here' - 'quote#' quote.xls". So I need the saveas to stop and allow filename updates. I hope this makes sense. Thanks, Michele -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excell2003 (SP-1) File > Save and File > Save As.. grayed out | Excel Discussion (Misc queries) | |||
Save to Path & Variable file name | Excel Programming | |||
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 | |||
Using a variable string in a file save path | Excel Programming |