This is a puzzle to me. I have macro that opens a text file, sorts it, etc. and draws a pivot table chart. I searched EE & found code to import a saved macro to the current workbook (the text file workbook):
InsertVBComponent ActiveWorkbook, "C:\My Documents\GrossPivotUpDate
.bas"
All of this works just dandy. Then I recorded creating a Forms command button & attaching this macro then changing the title to "Select New Department". Here's the puzzle. The recorded code will not create the command button when added to the existing macro. Anyone know what's missing?
This macro is for my use only so I'm not stressed about end users with this one. I run the CreateGrossPivot macro once a month & I can easily make a command button when the macro is done. It's just curious. What's the issue? Is it because I'm using a form command button on a chart? I like them because they are easy & allow me to attach an existing macro.
Thanks,
Susan
Start Free Trial