Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Use variabel as reference

Sub xref()
Dim xy(1 To 10), yy, zz
xy(2) = "Congratulations!!!"
yy = 2
MsgBox xy(yy)
End Sub


--

HTH

RP

"Andres Angel" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting the sum of variabel ranges Hein Excel Worksheet Functions 4 March 26th 06 07:44 PM
Variabel and caption in userform Tom Ogilvy Excel Programming 3 September 21st 04 08:53 PM
Variabel and caption in userform Gary Brown[_7_] Excel Programming 0 September 21st 04 07:59 PM
Variabel and caption in userform sebastienm Excel Programming 0 September 21st 04 07:57 PM
Using a variabel to make an array? SkatKat Excel Programming 4 May 24th 04 02:08 PM


All times are GMT +1. The time now is 11:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"