Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook that has a reference to an add-in. I know that the
reference works, because I can call the addin's functions and variables from within my workbook. However, in my addin, I refer to the workbook's worksheets using their codenames (so that if my users change the worksheet name, it doesn't mess up my code). When I run the code, I get an error message: "Object doesn't support this property or method" Here's an example -- ActiveWorkbook has a worksheet with the codename shtDiary Addin code looks like this: strDiaryDate = ActiveWorkbook.shtDiary.Cells(1,1).Value2 if I change it to refer to the collection using the worksheet name it works just fine: strDiaryDate = ActiveWorkbook.Worksheets("Diary").Cells(1, 1).Value2 Why isn't this working? Any help greatly appreciated. Dianne |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loops with sheet codenames | Excel Discussion (Misc queries) | |||
Referring to cells on other sheets using formula | Excel Discussion (Misc queries) | |||
Referring to sheets in formulas | Excel Discussion (Misc queries) | |||
Edit Sheets in Excel Addin | Excel Discussion (Misc queries) | |||
Pivot shart referring to multiple sheets | Charts and Charting in Excel |