Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default question about creating variable from 2 strings

may have asked this before, but can't find it.
is it possible to create a variable from 2 strings and have it return the value?
Simple example, RowColor is Dimmed as Long and has as value of 4
2 strings, one String1 is "Row" the other, String2 is "Color"
join the 2 strings to make "RowColor"

range("A1").interior.colorindex = String1 & String2


--



Gary


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default question about creating variable from 2 strings

went a different route and used select case instead.

--


Gary


"Gary Keramidas" <GKeramidasATmsn.com wrote in message ...
may have asked this before, but can't find it.
is it possible to create a variable from 2 strings and have it return the value?
Simple example, RowColor is Dimmed as Long and has as value of 4
2 strings, one String1 is "Row" the other, String2 is "Color"
join the 2 strings to make "RowColor"

range("A1").interior.colorindex = String1 & String2


--



Gary


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default question about creating variable from 2 strings

How about putting the values in a collection?

Sub test()
Dim col As New Collection
Dim String1 As String, string2 As String

col.Add 4, "RowColor"
col.Add 12, "RowHeight"

String1 = "Row"
string2 = "Color"

MsgBox col(String1 & string2)

End Sub


--
Hope that helps.

Vergel Adriano


"Gary Keramidas" wrote:

may have asked this before, but can't find it.
is it possible to create a variable from 2 strings and have it return the value?
Simple example, RowColor is Dimmed as Long and has as value of 4
2 strings, one String1 is "Row" the other, String2 is "Color"
join the 2 strings to make "RowColor"

range("A1").interior.colorindex = String1 & String2


--



Gary


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
Text strings from a variable string Ferdy New Users to Excel 1 October 26th 09 07:41 PM
Parse variable length strings Ray Excel Discussion (Misc queries) 3 May 15th 09 09:49 PM
Creating strings for legend [email protected] Excel Discussion (Misc queries) 4 April 27th 08 12:59 PM
Converting variable text strings to numeric Richgard53 Excel Discussion (Misc queries) 1 July 13th 05 06:22 AM
concatenating strings to call a variable Frank Brown[_2_] Excel Programming 2 April 13th 04 03:29 PM


All times are GMT +1. The time now is 05:35 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"