View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Links between VBcomponents and Sheets

Paul,

The codemodule is a property of the worksheet:

ThisWorkbook.VBProject.VBComponents.("Sheet1").Cod eModule

HTH,
Bernie
MS Excel MVP

"Paul" wrote in message
...
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.