Larry Serflaten
4/9/2012 9:57:00 AM
BeeJ wrote:
> Is there not a way to just get the name the object was assigned?
No, and to understand why, try thinking on a smaller scale:
Sub Form_Load()
Dim Foo As Long, Bar As Long
Foo = Rnd * 100
Bar = Rnd * 100
DoSomething Foo
End Sub
Sub DoSomething(FooBar As Long)
' How can you tell the name of the passed variable?
End Sub
Code running in the DoSomething sub has no way to know which
variable was passed, Foo, or Bar. Do you know why?
LFS