View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andibevan[_2_] Andibevan[_2_] is offline
external usenet poster
 
Posts: 128
Default Create Function to display name of variable

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