Create Function to display name of variable
Sub Test
MyText = "Hello"
MsgBox MyText & vbcr & "World..!"
End Sub
"Andibevan" wrote in message
...
| Hi All,
|
| I want to create a small function (for example called printvar) that when
it
| is called it prints the name of the variable that was passed to it in a
| message box. There may well be an obvious way of doing this but I don't
| know it.
|
|
| E.g.
|
| Sub Test
| MyText = "Hello"
|
| MsgBox PrintVar(MyText)
|
| End Sub
|
| The Result would then by "MyText" in a messagebox.
|
| Any ideas?
|
| Ta
|
| Andi
|
|
|