LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default names of variables in array

I am using a set of keywords to get data from a batch of text files
i can load the keywords into an array at the start of the program
and then use each one to sequentially search each text file in turn
Can I convert the array contents to names of variables and vice-verca?
(Would make code very compact)

Dim kwd1 As Double, kwd2 As String
myarr = Array("kwd1", "kwd2")
ConvertedToVariableName(myarr(0)) = 50.1
ConvertedToVariableName(myarr(1)) = "mystring"
MsgBox kwd1 'returns value 50.1
MsgBox kwd2 'returns string "mystring"

 
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
string variables in file names dr chuck Excel Programming 2 July 1st 06 07:53 PM
Inserting variables within file names kestrel Excel Worksheet Functions 3 June 16th 06 08:00 PM
Passing Worksheet Names as Variables francd1 Excel Programming 3 June 29th 05 11:30 AM
Sub Routine Names As Variables [email protected] Excel Programming 2 January 15th 04 09:54 PM
variables for file names mike Excel Programming 1 July 9th 03 11:39 PM


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

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"