View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
captbluefin[_2_] captbluefin[_2_] is offline
external usenet poster
 
Posts: 1
Default variable that refernces the values in a text box


This problem is easiest explained by looking at the next line of code
from a command button on a form:

ActiveCell.Value = "txtTest1" + ".Value"

When I look at active cell the words txtTest1.Value are in the cell.

What I want to be in the cell is the data that is in the text box
itself.

If I type Hello into the forms text box that is named txtTest1, I would
like the active cell of the active sheet to contain the word Hello.

Why: there are 30 text boxes on the form I am working on (txtTest1
...txtTest30). I want to use a counter to reference the contents of:
txtTest1 txtTest2 txtTest3 .......

Any help would be greatly appreciated. I've tried everything I can
think of. Made myself batty trying to figure out what I am doing
wrong!


--
captbluefin
------------------------------------------------------------------------
captbluefin's Profile: http://www.excelforum.com/member.php...fo&userid=1479
View this thread: http://www.excelforum.com/showthread...hreadid=162451