Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Declare Worksheet name over multiple modules

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Declare Worksheet name over multiple modules

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Declare Worksheet name over multiple modules

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Declare Worksheet name over multiple modules

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Modules in the same workbook? kartune85[_15_] Excel Programming 6 June 26th 06 08:51 AM
Public, Private, Event modules, Forms modules,,, Jim May Excel Programming 11 October 31st 05 03:12 AM
Multiple Modules, or one big one? Adrian[_4_] Excel Programming 2 April 1st 04 11:38 AM
Running Multiple Modules With 1 Command Gary Excel Programming 2 January 31st 04 10:07 PM
using forms and modules in multiple workbooks scrabtree23[_2_] Excel Programming 1 November 11th 03 10:57 PM


All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"