mperrah
06-21-2007, 08:01 PM
I have a project that I need to save parts of and email them to three different people.
Each person only needs some the sheets in the project.
I run a macro to remove the unwanted sheets for each person
and I have 3 named cells that have the names I want to use to save as.
When I use the recorder, it won't let me paste form the clipboard.
I found a code in this forum to start the save as dialoge,
is there a way to script the 'save as' to use a named range (or cell)?
one named cell is "wprName" for one of the projects
the location is AK3
this is the code I have started:
not sure where to code the named range for the file save as name...
Sub SaveAsName()
Dim sFileName As String
'Show the open dialog and parse the selected _
file name To the String variable "sFileName"
sFileName = Application.GetSaveAsFilename
'They have cancelled
If sFileName = "False" Then
Exit Sub
ThisWorkbook.SaveAs sFileName
End If ' add later to fix error
End Sub
thank you in advance
Mark
Each person only needs some the sheets in the project.
I run a macro to remove the unwanted sheets for each person
and I have 3 named cells that have the names I want to use to save as.
When I use the recorder, it won't let me paste form the clipboard.
I found a code in this forum to start the save as dialoge,
is there a way to script the 'save as' to use a named range (or cell)?
one named cell is "wprName" for one of the projects
the location is AK3
this is the code I have started:
not sure where to code the named range for the file save as name...
Sub SaveAsName()
Dim sFileName As String
'Show the open dialog and parse the selected _
file name To the String variable "sFileName"
sFileName = Application.GetSaveAsFilename
'They have cancelled
If sFileName = "False" Then
Exit Sub
ThisWorkbook.SaveAs sFileName
End If ' add later to fix error
End Sub
thank you in advance
Mark