Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Passing Public Module Vairable to a Worksheet Event

Can any tell me how to pass a module declared variable toa worksheet event.
In this instance a Before Double Click event

TIA

John Howard
Sydney, Australia


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Passing Public Module Vairable to a Worksheet Event

This is an example:

1. Insert a module and declare a variable

Public Const xx = 100

2. In your Sheet module, the event is:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
MsgBox Module1.xx
End Sub

The MsgBox line prefixes the reference to the variable xx by the module
name. If you have only one module, the prefix is unnecessary although its
presence may be helpful in debugging.

"SMS - John Howard" wrote:

Can any tell me how to pass a module declared variable toa worksheet event.
In this instance a Before Double Click event

TIA

John Howard
Sydney, Australia



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
Declaring variables in Module vs. Public Jeff Excel Discussion (Misc queries) 5 November 19th 07 08:27 PM
Where?Worksheet code module or Worksheet_SelectionChange event han Kenzie Excel Worksheet Functions 4 January 30th 06 09:41 PM
Passing Strings from UserForm to Module John Kauffman Excel Programming 3 May 28th 04 05:01 PM
Passing variables from module to userform Chris Dunigan Excel Programming 4 November 26th 03 09:37 AM
Passing ARGUMENTS between event procedures of a USERFORM jason Excel Programming 8 November 10th 03 07:36 PM


All times are GMT +1. The time now is 01:13 AM.

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

About Us

"It's about Microsoft Excel"