Need Help
You can declare it as a public property.
Private vOptionLookup as Variant
Public Property Let OptionLookup (v As Variant)
vOptionLookup = v
End Property
Public Property Get OptionLookup () As Variant
OptionLookup = vOptionLookup
End Property
" wrote:
I am trying to set a variant to be public. My code would look
something like this.
Option Explicit
Public vOptionLookup as Variant
________________________________________
Sub SetVariables ()
vOptionLookup = Application.VLookup(rItem, rItemsInfo, 37, False)
End Sub
_________________________________________
Sub OptionLookup()
Application.Run "SetVariables"
Range("A1").Value = vOptionLookup
End Sub
The problem is that in the help file it says Variants are not
supported to be public, which I found to be true. Is there a work
around or something I can do to make this Variant public so I can use
it in several different places?
Any input would be awsome. Thanks.
|