Links between VBcomponents and Sheets

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Each time a worksheet is added to a workbook, a new
VBComponent is added to the relevant VBProject. How does
Excel keep track of the link between the new component, a
memeber of the VBComponents collection, and the sheet, a
member of the Sheets collection? Also, how is the link
between the ThisWorkbook component and the actual
workbook managed? Thanks.
 
Paul,

The codemodule is a property of the worksheet:

ThisWorkbook.VBProject.VBComponents.("Sheet1").CodeModule

HTH,
Bernie
MS Excel MVP
 
Oops, I left an extra . in there....

ThisWorkbook.VBProject.VBComponents("Sheet1").CodeModule
 

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