Importing/exporting macros

  • Thread starter Thread starter Maarten
  • Start date Start date
M

Maarten

Hi,

In my Excel sheet I programmed a macro, and I must say it works fine ..

But, how to apply that same macro in another spread sheets, for replay.

In my first sheet I exported the macro, and then I imported the macro in my second sheet, but it did
not work.

Must the file be saved as file type *.cls or what ???

Some help would be nice.

Newbie.
 
Hello
VBA code exported from a worksheet is saved as a class module (.CLS).
To import code into a new sheet the simplest way is just to copy from the
original sheet and paste onto your new sheet (right-click on your worksheet
tab, select View Code and then paste).

HTH
Cordially
Pascal
 

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

Back
Top