I have a question on the file name.
I constructed a macro that basically extracts data from one spreadsheet and puts it on a new spreadsheet in a different format.
In order for my macros to function the orginal spreadsheet must be named Modified RQFR.xls
My colleagues often rename the sheet to a different name so they know what data is on it. I've instructed them to rename the sheet back when extracting the data.
My question is if there's a way around this so that the orginal sheet (the one that contains the macros) can named anything and have the macro still function?
Here's the macro.
Sub SetupQuote()
Set NewBook = Workbooks.Add
With NewBook
.Title = "Empowerment Quote"
.SaveAs Filename:="Empowerment Quote.xls"
End With
Windows("Modified RQFR.xls").Activate
Range("F5").Select
Selection.Copy
Windows("Empowerment Quote.xls").Activate
Range("A4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Bookmarks