View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andres Angel[_2_] Andres Angel[_2_] is offline
external usenet poster
 
Posts: 2
Default Use variabel as reference

Hi Everyone:
I need some help here.
The code below is just a sample of what I'm trying to do.

I need to use the value in a variable as the reference for
another variable.
In the code below I will create "xy2" in "zz" then
display "zz". If the code is correct it should
display "Congratultaions!!!" the value for "xy2".

How can I do that change in reference?

Sub xref()
xy2 = "Congratulations!!!"
yy = 2
zz = "xy" & yy
MsgBox zz
End Sub


Andres Angel