View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default Passing a variable from sheet code to a module

'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.