Public/Procedure Variable

  • Thread starter Thread starter Otto Moehrbach
  • Start date Start date
O

Otto Moehrbach

Excel 2003, WinXP
I have a called sub:
Sub Test(TheCell as Range)
End Sub

This declares TheCell as a procedure variable. I want to declare TheCell as
a Public variable. If I declare TheCell As Range as Public at the top of
the module, how do I write the "Sub" line of this macro? Thanks for your
help. Otto
 
Sub Test()
msgbox thecell.Address
End Sub

You don't need to pass it if it is public.
 
And I hit myself in the forehead again. Why is it so obvious after you
explain it? Thanks Tom. Otto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top