PorscheGT2
Programmer
Ok, here's the code I did last night:
Private Sub Create_Copy_Click()
Unload UserOptForm
SrvArea = Range("d5"
svname = SrvArea & " - BOBCopy.xls"
Workbooks.Add.SaveAs FileName:=svname
Windows("The 2004 Book of Business Report.xls"
.Activate
ActiveSheet.Select
ActiveSheet.Copy Before:=Workbooks(svname).Sheets(1)
Windows(svname).Activate
User_Options.Visible = False
About_Button_SA.Visible = False
Exit_Bob_SA.Visible = False
End Sub
This code works in Excel 2000 also saved as 97, but when I ran the macro this morning on Excel 97 it gave me an error. Is there a better way to do this? TIA!
Private Sub Create_Copy_Click()
Unload UserOptForm
SrvArea = Range("d5"
svname = SrvArea & " - BOBCopy.xls"
Workbooks.Add.SaveAs FileName:=svname
Windows("The 2004 Book of Business Report.xls"
ActiveSheet.Select
ActiveSheet.Copy Before:=Workbooks(svname).Sheets(1)
Windows(svname).Activate
User_Options.Visible = False
About_Button_SA.Visible = False
Exit_Bob_SA.Visible = False
End Sub
This code works in Excel 2000 also saved as 97, but when I ran the macro this morning on Excel 97 it gave me an error. Is there a better way to do this? TIA!