Save Excel without macros

G

Guest

Here is my goal. Part 1, I want to have a program to open an Excel template that uses macros to access data from multiple files and format the information. This part was accomplished.

Part 2, I want to save this file under a different name as a .XLS file withouth the macros (data only) while keeping the Excel Template intact for future use.

It is part 2 that I need assistance.

Please be as explicit as possible in your response.

Thanks!

Joe

P.S. I had seen a previous question regarding saving Excel where a macro deletes all the macros. It referred to http://www.cpearson.com/excel/vbe.htm

I received some error messages - Compile errors: User defined type not defined for "Dim VBComp As VBIDE.VBComponent"

I am a novice from a VB perspective - haven't written any serious code in over 10 years so assume I forgot everything.
 
C

Chip Pearson

I received some error messages - Compile errors: User defined
type not defined for "Dim VBComp As VBIDE.VBComponent"

As my web page points out, you must set a reference to the
extensibility library, which is where types like VBComponent are
defined. In VBA, go to the Tools menu, choose References, and
scroll down to "Microsoft Visual Basic For Applications
Extensibility Library" and put a check next to it.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




jgranda said:
Here is my goal. Part 1, I want to have a program to open an
Excel template that uses macros to access data from multiple
files and format the information. This part was accomplished.
Part 2, I want to save this file under a different name as a
..XLS file withouth the macros (data only) while keeping the Excel
Template intact for future use.
It is part 2 that I need assistance.

Please be as explicit as possible in your response.

Thanks!

Joe

P.S. I had seen a previous question regarding saving Excel
where a macro deletes all the macros. It referred to
http://www.cpearson.com/excel/vbe.htm
I received some error messages - Compile errors: User defined
type not defined for "Dim VBComp As VBIDE.VBComponent"
I am a novice from a VB perspective - haven't written any
serious code in over 10 years so assume I forgot everything.
 
G

Guest

Chip,

Thanks for the note. I have "Microsoft Visual Basic For Applications" several times but I do not have "Microsoft Visual Basic For Applications Extensibility Library" in my list. Is it one of the MVBFA selections and how can I tell which. There are file names but not versions.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top