PDA

View Full Version : Solved: Where can I find a script that will copy the activesheet



Erays
03-14-2005, 06:30 PM
Where can I find a script that will copy the activesheet and name it from data entered in a cell and save it to a folder of my choice?

Steiner
03-15-2005, 01:58 AM
This might do it:



Sub MyCopySheet()
Dim sPath$, sName$

'Change this, don't forget the trailing \
sPath = "e:\test\"

'Cell with the name is A1 on active sheet, change this
sName = ActiveSheet.Range("A1").Value

ActiveSheet.Copy
ActiveSheet.SaveAs sPath & sName
End Sub