View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
AA2e72E AA2e72E is offline
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