R
Ren
I have a file ("orinignal") that has tabs one, two, three.....
I want to write a macro to export tabs to seperate files and save them
automatically. FIle one would include tab one, two, three. File two would
include tab one, two, four, etc.
I know i can do
Sheets(Array("one", "two", "three")).Select
Sheets(Array("one", "two", "three")).Copy
ActiveWorkbook.SaveAs Filename:= _
"C:\one.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Windows("original.xls").Activate
My question is how do i get back to the original file without hardcoding the
file name like in windows("original.xls").active. Is there a method I can use
to get the file name and save it in a text string and refere it back by using
windows(string).activate .
I am also wondering how i can get a user input text box in excel so I can
ask the user where to save it. I can't remember the method and was probably
searching for the wrong terms in google.
Thanks,
Steven
I want to write a macro to export tabs to seperate files and save them
automatically. FIle one would include tab one, two, three. File two would
include tab one, two, four, etc.
I know i can do
Sheets(Array("one", "two", "three")).Select
Sheets(Array("one", "two", "three")).Copy
ActiveWorkbook.SaveAs Filename:= _
"C:\one.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Windows("original.xls").Activate
My question is how do i get back to the original file without hardcoding the
file name like in windows("original.xls").active. Is there a method I can use
to get the file name and save it in a text string and refere it back by using
windows(string).activate .
I am also wondering how i can get a user input text box in excel so I can
ask the user where to save it. I can't remember the method and was probably
searching for the wrong terms in google.
Thanks,
Steven