Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Test()
msgbox thecell.Address End Sub You don't need to pass it if it is public. -- Regards, Tom Ogilvy "Otto Moehrbach" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And I hit myself in the forehead again. Why is it so obvious after you
explain it? Thanks Tom. Otto "Tom Ogilvy" wrote in message ... Sub Test() msgbox thecell.Address End Sub You don't need to pass it if it is public. -- Regards, Tom Ogilvy "Otto Moehrbach" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Set Public Variable on Open | Excel Discussion (Misc queries) | |||
Public variable | New Users to Excel | |||
Declaring Public Procedure | Excel Programming | |||
Scope of Public Variable | Excel Programming | |||
public variable | Excel Programming |