Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to create a macro enabled Excel 2007 workbook from a routine in
another workbook. I've tried using the workbook.add method but it does not support the macro enabled file type or xlsm extension. Any help is always greatly appreciated. Ken |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Your xl version? xl2007 can work with a regular .xls file The user can open and, if desired, save as .xlsM -- Don Guillett Microsoft MVP Excel SalesAid Software "Ken Warthen" wrote in message ... I need to create a macro enabled Excel 2007 workbook from a routine in another workbook. I've tried using the workbook.add method but it does not support the macro enabled file type or xlsm extension. Any help is always greatly appreciated. Ken |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This saves an .xlsm file on my desktop
Option Explicit Sub Test() Dim myWB As Excel.Workbook Dim myFolder As String Set myWB = Workbooks.Add myFolder = "C:\Documents and Settings\" & _ Environ("USERNAME") & "\Desktop\" myWB.SaveAs myFolder & "BarbsFile.xlsm", FileFormat:=52 End Sub In Excel 2007, you need to include the FileFormat. Read this from Ron de Bruin http://www.rondebruin.nl/saveas.htm HTH, Barb Reinhardt "Ken Warthen" wrote: I need to create a macro enabled Excel 2007 workbook from a routine in another workbook. I've tried using the workbook.add method but it does not support the macro enabled file type or xlsm extension. Any help is always greatly appreciated. Ken |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Macro-enabled Workbook | Excel Discussion (Misc queries) | |||
Excel 2007-macro enabled, multi-sheet opening in minimized mode | Excel Discussion (Misc queries) | |||
Error when opening a macro-enabled Excel 2007 file | Excel Discussion (Misc queries) | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Default a workbook to save as a xlsm (macro-enabled) in 2007 | Excel Discussion (Misc queries) |