Complicated Save

A

AFairRose

Hi All,

I have some data sheets generated that are saved as excel Web Pages. I
need to write a macro that will allow the user to use the same file
name but save to a specified location different from the original
document. I also need it to update the saved format to *.xls

Macro I have written, uses the original name (good) but saves over the
original files and not to the new location (bad).

Newer macro writer this is what I have:

ActiveWorkbook.SaveAs
ChDir "X:\Elmo\Sesame Street\Number 3\Red House"
Dim fn As Variant
fn = Application.GetSaveAsFilename( _
"Excel files,*.xls", 1, "X:\Elmo\Sesame Street\Number 3\Red
House\*.xls")
If TypeName(fn) = "Boolean" Then Exit Sub
ActiveWorkbook.Save

End Sub

Any and all help greatly appreciated!

Thanks
 
A

Ardus Petus

Sub SaveWB()
Dim fn As Variant
ChDir "X:\Elmo\Sesame Street\Number 3\Red House"
ChDrive "X:"
fn = Application.GetSaveAsFilename( _
, _
"Excel files,*.xls", _
1, _
"X:\Elmo\Sesame Street\Number 3\Red House\*.xls")
If fn = False Then Exit Sub
ActiveWorkbook.SaveAs fn

End Sub

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top