Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to pass a variable from a worksheet_calculate macro to a macro
in a module? I'm familiar with public variables and calling functions, but these don't enable me to do what I need. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put a variable declaration as public before the first procedure in a standard
VBA module (NOT a worksheet module OR a form module). Ex: PUBLIC varTest as variant This variable is now available to ALL MODULEs including worksheet modules -- Hope this helps. If it does, please click the Yes button. Thanks in advance for your feedback. Gary Brown "Robert Pearson" wrote: Is it possible to pass a variable from a worksheet_calculate macro to a macro in a module? I'm familiar with public variables and calling functions, but these don't enable me to do what I need. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
'Sheet Module...
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim Sludge As Double Sludge = Me.Range("A1").Value Call MacroInModule(Sludge) End Sub 'Standard/General Module... Sub MacroInModule(ByRef PassedValue As Double) 'do something using PassedValue End Sub -- Jim Cone Portland, Oregon USA "Robert Pearson" <Robert wrote in message ... Is it possible to pass a variable from a worksheet_calculate macro to a macro in a module? I'm familiar with public variables and calling functions, but these don't enable me to do what I need. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing Public Variable into Sheet Sub Functions | Excel Programming | |||
Code to change code in a sheet and workbook module | Excel Programming | |||
passing a variable from sheet to form to another sheet | Excel Programming | |||
Passing Variable from Sheet to Userform | Excel Programming | |||
Variable from a sheet module in a class module in XL XP | Excel Programming |