Selection Change Event
I am trying to write a macro that pulls R values from trendlines any time a
common variable is changed. The variable is stored in "k2," and I have tried
to run this using the following code placed in "ThisWorkbook":
Public myRange As Range
Set myRange = Worksheets(1).Range("K2")
Private Sub Worksheet_SelectionChange(ByVal myRange As Excel.Range)
Call getRvalues
End Sub
It's not working, and I'm not sure why. I bet it has something to do with
my range declaration, but can someone confirm that? When I'm working with
events, what's the proper way to declare variables and objects relating to
these events?
Thanks,
Pflugs
|