View Single Post
 
Old 06-18-2012, 01:14 PM
missmr28 missmr28 is offline Windows XP Office 2010 32bit
Novice
 
Join Date: Jun 2012
Posts: 2
missmr28 is on a distinguished road
Default the saveas macro in excel 2010 is not transferring the macros to the new workbook

Hi
I have a workbook that has 3 macros and 3 worksheets. I created a saveas macro in order to transfer one worksheet to a different file and give it a filename that includes today's date. When I used the saveas macro, the worksheet was converted into a separate file in the correct destination and had the correct filename. But then, none of the 3 macros were present in this new file. Below is the code that I used. Can someone help me with figuring out why the macros didnt get transferred? Thanks!

Sub savemdrwork()

Thisdate = Range("F3").Value
If Thisdate = "" Then
MsgBox "Please Enter Today's Date", vbInformation
GoTo EndMacro
End If
Application.ScreenUpdating = False
ActiveSheet.Select
ActiveSheet.Copy
ThisFile = Range("F3").Value
ActiveSheet.SaveAs Filename:="E:\operator calibration files\mdr " & ThisFile & ".xlsm", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
Application.ScreenUpdating = True

'EndMacro: Range("F3").Select
End Sub
Reply With Quote