Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
Im my workbook I have a sheet named "Departments". In the code for this sheet I have the following sub DTest msgbox "Hello from DTest" end sub My code in Module 1 includes the following Option Explicit Public Departments as worksheet pubilc sub setup Set Departments = activeworkbook.sheets("Departments") end sub sub Test1 setup Departments.DTest end sub When I try to complie this code, VBA insists on interpreting Departments.Dtest as a method of the object variable Departments rather than a reference to the routine DTest found on the code for the sheet named Departments. So an error is generated. Casn anyone think of a way around this preblem? Thanks -- -regards |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
AutoFilter Quirk | Excel Discussion (Misc queries) | |||
an interesting Excel question | Excel Discussion (Misc queries) | |||
Formatting custom currency quirk | Excel Discussion (Misc queries) | |||
another interesting thing... | Excel Worksheet Functions | |||
a VLOOKUP quirk | Excel Worksheet Functions |