Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Spreadsheet columns to new workbook

Status
Not open for further replies.

Lhuffst

Programmer
Jun 23, 2003
503
US
My spreadsheet has 3 buttons which run macros and then columns of data under the buttons. I need to save the spreadsheet information to a new spreadsheet but not the macros. How would I do this?

I've tried to use the saveas method but it saves the macros as well.

I've tried copying the range to a new sheet and then saving, but it still keeps the macros.

Any help will be appreciated.
Lhuffst
 
If the macros are located on your spreadsheet they will always be saved when you copy it, if the macros(functions) are used in a cell they will always be referenced on your new spreadsheet as soon as you copy...

I don't really get what your trying to do, you could copy only values but it all depends on what you want to do, maybe you could give more information???

Read this:

How Do I Get Great Answers to My Tek-Tips Questions?

"Knowing that you know is the greatest sign of stupidity, knowing that you are ignorant is the best proof of intelligence.
 
Managing toolbar and button are a quite interesting Excel feature that works kind of different as one might think.

When you create a toolbar or button, you are saving that button in an XLB file located in the Windows directory. So buttons and toolbars are not related to a particular workbook.

I suggest that you work your buttons and create them on the fly ( like with the open workbook event ) and delete them when you close the workbook (close event).

Example: If you create a toolbar - button in Workbook A and then close the workbook, when you open another workbook, the toolbar - button will still be there. Because you upload the XLB file everytime you open Excel.

Anyway, maybe your solutions comes from another perspective. More info would help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top