Save only the code from a Sheet?

  • Thread starter Thread starter christopher.allen
  • Start date Start date
C

christopher.allen

Hi,

How do I save only the code from a sheet? I've been slogging through
the VBA ref docs and the web (and this place!) but haven't been able to
find this. Thanks!

-Christopher
 
Go to the VBIDE, select the code module, and File>Export it.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
I meant programmatically. I tried recording a macro and doing what you
said, but I can't record from the VB editor.
 
ThisWorkbook.VBProject.VBComponents("Module1").Export ("C:\module1.bas")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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