View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GJones GJones is offline
external usenet poster
 
Posts: 132
Default using code from an addin

Hi Heidi;

If I understand you question correctly you can change the
subs to be public instead of private and that should work.

Thanks,

Greg
-----Original Message-----
okay, this should be pretty darned simple, but it seems

those are always the things that jump up and bite me.

i've created a workbook that has 12 modules and 7 user

forms. this workbook will be distrubuted to others, so
obvioulsy the best thing to do is to make all the code an
add in and have some basic workbook and worksheet
functions that call the add in code.
i've gotten that far, and added code that successfully

adds the add in at the opening of the workbook. but then
it says that it can not see any of my add in module
names.
am i referencing them incorrectly? this has to be

something that is very simple that i am just having a
brain hiccup on.....

i.e.:

Private Sub Worksheet_Change(ByVal Target As Range)

AddInWorksheet_Change Target

End Sub

where AddInWorksheet_Change is defined in the addin

workbook as a public sub:

Public Sub AddInWorksheet_Change(ByVal Target As Range)

Dim sCellAddress As String
Dim rNew As Range
Dim rOld As Range
etc......

thanks much,
heidi
.