Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default how to use a cell value as the base for the name of a variable

I have a list of names stored in a worksheet and I want to use these to
define a set of variables.

I there anyway to do this

I tried this

Dim Sheets("names").Cells(1,1).Value As String

but with no luck

Ian B
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default how to use a cell value as the base for the name of a variable

Hi Ian,

Perhaps you could do something like:

Sub Test()
Dim arrNames As Variant

arrNames = Range("A1:A20")

For i = LBound(arrNames) To UBound(arrNames)
Debug.Print arrNames(i)
Next i

End Sub


---
Regards,
Norman



"Ian B" wrote in message
...
I have a list of names stored in a worksheet and I want to use these to
define a set of variables.

I there anyway to do this

I tried this

Dim Sheets("names").Cells(1,1).Value As String

but with no luck

Ian B



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
emptying the contets of a cell base on the value of another cell tracktor Excel Worksheet Functions 3 May 17th 08 06:27 AM
Define a cell value base on the date BaseballFan Excel Discussion (Misc queries) 2 April 10th 07 01:51 AM
how to show different photos, base on different value of a cell? Howard Hsu Excel Worksheet Functions 2 January 25th 06 06:57 PM
unique values in a cell base on another cell Jay Excel Discussion (Misc queries) 2 November 18th 05 06:46 PM
Playing a sound base on cell value Mike[_58_] Excel Programming 4 November 30th 03 03:53 AM


All times are GMT +1. The time now is 06:36 AM.

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

About Us

"It's about Microsoft Excel"