Prev: Insert Picture using Macro
Next: To prevent a user from deleting and renaming a sheet in a workbook
From: joel on 8 Apr 2010 06:18 The workbook created didn't havve macros enabled Try this from Set Newbook = Workbooks.Add(template:=xlWBATWorksheet) to Set Newbook = Workbooks.Add(template:=xlWBATExcel4IntlMacroSheet) Or from Newbook.SaveAs Filename:=Folder & client to Newbook.SaveAs Filename:=Folder & client, FileFormat:=xlExcel12 -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/showthread.php?t=193510 http://www.thecodecage.com/forumz
From: jc on 8 Apr 2010 10:52 I am not running the macros from the new workbooks I have a workbook called MyMacros I store most macros in. Will changing this to macro enabled workbook allow the subtotals to be expanded from a macro ran from a different workbook. All the code you helped with works great , just the new workbooks have coppied the data from the original workbook and left it compressed subtotal. Hence the new workbook has just 1 visible row until the subtotal "+" in the far left column is expanded.
From: joel on 8 Apr 2010 11:48 I tried to record a macro to expand the subtotals and no code was recorded. Wouldn't it be simplier to just expand the subtotals once before you run the macro? -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/showthread.php?t=193510 http://www.thecodecage.com/forumz
From: jc on 8 Apr 2010 17:27 That worked no problem. Thanks Joel JC
First
|
Prev
|
Pages: 1 2 Prev: Insert Picture using Macro Next: To prevent a user from deleting and renaming a sheet in a workbook |