View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Passing Module to subroutine

Humor me. Why do you want to pass a module? I know in C/C++ you can pass a
function but I am unaware of how or why you would want to in VBA.
--
HTH...

Jim Thomlinson


"SixSigmaGuy" wrote:

I'm trying to pass a Module object (if it is an object) to a routine, but I'm
having no luck. If I type it as an object, it gives me a ByRef error.
Everythign else I tried results in an even worse error. The VBA help file
for the topic "Referring to Sheets by Index Number" says that the Sheets
collection, includes modules ("If you want to work with all types of sheets
(worksheets, charts, modules, and dialog sheets), use the Sheets property.")
should work, but when I walk though the Sheets collection, all I get are
worksheets. Anyone know how I can pass a module object to a subroutine?