copying code from personal folder

A

Anders

Hi All,

In xl03, my macro creates a new workbook, formats it and begins pasting data
from other sources. What I would like to do is at the beginning of the
macro, insert code from a module in my personal macro folder into the newly
created sheet's code (not add a module, but paste to the sheet's code). I've
tried recording it, but it only shows the open/close. I saw another post
from someone else on here that linked to a dead site. I could also store the
desired code in another workbook to access it, but still can't get to the
editing sheet code part.

TIA,
Anders
 
M

Matthew Herbert

Hi All,

In xl03, my macro creates a new workbook, formats it and begins pasting data
from other sources.  What I would like to do is at the beginning of the
macro, insert code from a module in my personal macro folder into the newly
created sheet's code (not add a module, but paste to the sheet's code).  I've
tried recording it, but it only shows the open/close.  I saw another post
from someone else on here that linked to a dead site.  I could also store the
desired code in another workbook to access it, but still can't get to the
editing sheet code part.

TIA,
Anders

Anders,

See Chip's site. Note though, that this will require you to trust
access to the VBA project object model, so be careful with what you
are doing.

http://www.cpearson.com/Excel/vbe.aspx

Best,

Matthew Herbert
 

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