![]() |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Tags |
excel 2010, macro, save as |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Range(Cell1,Cell2) Error on another workbook controlling some other workbook? | tinfanide | Excel Programming | 1 | 02-09-2012 04:08 PM |
Cutting and Pasting and Macro problems in Excel 2010 | enkel | Excel Programming | 3 | 01-02-2012 10:15 PM |
Mail with macro Excel 2010 | santors71 | Excel Programming | 1 | 12-07-2011 06:34 AM |
How do I assign a macro to a button when the macro is in my personal workbook? | foolios | Excel Programming | 2 | 07-27-2011 02:41 PM |
![]() |
virsojour | Excel Programming | 5 | 02-01-2011 08:58 PM |