Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Bind VBA Variable to Range().Value2 Property
I want to use Excel VBA variables in modules and classes as "shorthand" for
the Range().Value2 property. I tried using declarations like: Dim Variable As Double Set Variable = Range("Cell Reference").Value2 Is there some way to use data binding in VBA to "link" a variable to a Named cell property? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Bind VBA Variable to Range().Value2 Property
Option Explicit
Public Property Get MyValue() As Double MyValue = Range("Cell.Reference").Value2 End Property "MachAngle" wrote: I want to use Excel VBA variables in modules and classes as "shorthand" for the Range().Value2 property. I tried using declarations like: Dim Variable As Double Set Variable = Range("Cell Reference").Value2 Is there some way to use data binding in VBA to "link" a variable to a Named cell property? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Bind VBA Variable to Range().Value2 Property
create the property, then use it in your code exactly as if it were a
'normal' variable eg x= myvalue * 2 "Patrick Molloy" wrote: Option Explicit Public Property Get MyValue() As Double MyValue = Range("Cell.Reference").Value2 End Property "MachAngle" wrote: I want to use Excel VBA variables in modules and classes as "shorthand" for the Range().Value2 property. I tried using declarations like: Dim Variable As Double Set Variable = Range("Cell Reference").Value2 Is there some way to use data binding in VBA to "link" a variable to a Named cell property? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Bind VBA Variable to Range().Value2 Property
Looks straight forward.... Thanks!
"Patrick Molloy" wrote: create the property, then use it in your code exactly as if it were a 'normal' variable eg x= myvalue * 2 "Patrick Molloy" wrote: Option Explicit Public Property Get MyValue() As Double MyValue = Range("Cell.Reference").Value2 End Property "MachAngle" wrote: I want to use Excel VBA variables in modules and classes as "shorthand" for the Range().Value2 property. I tried using declarations like: Dim Variable As Double Set Variable = Range("Cell Reference").Value2 Is there some way to use data binding in VBA to "link" a variable to a Named cell property? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Early bind to Late bind | Excel Programming | |||
Excel & C# NullReference Error when trying to set Range.Value2 | Excel Programming | |||
Range.Value2 is failing for lenghty strings | Excel Programming | |||
Merged cells Value2 property | Excel Programming | |||
range variable won't assign (chartobject.topleftcell property) | Excel Programming |