Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Is it possible to declare the worksheets name once and use it over multiple modules. ie Dim wksCurrent as worksheet Set wksCurrent = worksheets("Test") Once the above is done I want to be able to use the wksCurrent in all of the modules I have available. Any ideas would be great. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, if the Dim statement is in a normal module.
NickHK "Noemi" wrote in message ... Hi Is it possible to declare the worksheets name once and use it over multiple modules. ie Dim wksCurrent as worksheet Set wksCurrent = worksheets("Test") Once the above is done I want to be able to use the wksCurrent in all of the modules I have available. Any ideas would be great. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Nick
Can you please elaberate on Normal Module??? Do you mean attached to a sheet or an actual module If an actual module what do I put up the top of the module Thanks "NickHK" wrote: Yes, if the Dim statement is in a normal module. NickHK "Noemi" wrote in message ... Hi Is it possible to declare the worksheets name once and use it over multiple modules. ie Dim wksCurrent as worksheet Set wksCurrent = worksheets("Test") Once the above is done I want to be able to use the wksCurrent in all of the modules I have available. Any ideas would be great. Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, insert a module and declare the top.
Not on a WS or class module NickHK "Noemi" wrote in message ... Hi Nick Can you please elaberate on Normal Module??? Do you mean attached to a sheet or an actual module If an actual module what do I put up the top of the module Thanks "NickHK" wrote: Yes, if the Dim statement is in a normal module. NickHK "Noemi" wrote in message ... Hi Is it possible to declare the worksheets name once and use it over multiple modules. ie Dim wksCurrent as worksheet Set wksCurrent = worksheets("Test") Once the above is done I want to be able to use the wksCurrent in all of the modules I have available. Any ideas would be great. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple Modules in the same workbook? | Excel Programming | |||
Public, Private, Event modules, Forms modules,,, | Excel Programming | |||
Multiple Modules, or one big one? | Excel Programming | |||
Running Multiple Modules With 1 Command | Excel Programming | |||
using forms and modules in multiple workbooks | Excel Programming |