Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy workbook, don't copy macro
Is it possible to copy a workbook but not the macro?
Backround - I have created a workbook which receives transferspreadsheet data from Access. I have an Excel macro which formats the sheet, then deletes the transferspreadsheet sheet. I want the user to be able to save this report with the current date, but not copy the macro to the new sheet. Is this possible? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy workbook, don't copy macro
Add code to your macro to move the formatted sheet into a new workbook,
change the MyNewWorkbook.xls to the name you want the new file to have and the FormattedSheet.xls name to the name of the workbook that contains the macro: Application.Workbooks.Add ActiveWorkbook.SaveAs "MyNewWorkbook.xls" Application.Workbooks("FormattedSheet.xls").Sheets (1).Activate Sheets(1).Activate ActiveSheet.Move Befo=Workbooks("MyNewWorkbook.xls").Sheets(1) -- Kevin Backmann "CongroGrey" wrote: Is it possible to copy a workbook but not the macro? Backround - I have created a workbook which receives transferspreadsheet data from Access. I have an Excel macro which formats the sheet, then deletes the transferspreadsheet sheet. I want the user to be able to save this report with the current date, but not copy the macro to the new sheet. Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to copy values to Workbook | Excel Discussion (Misc queries) | |||
Macro to Copy From One Workbook To Another | Excel Discussion (Misc queries) | |||
How can I copy a macro into another workbook? | New Users to Excel | |||
Copy macro to another workbook | Excel Discussion (Misc queries) | |||
copy text from 1 workbook to another by macro | Excel Worksheet Functions |