Thread
:
variable that refernces the values in a text box
View Single Post
#
2
Posted to microsoft.public.excel.programming
Chip Pearson
external usenet poster
Posts: 7,247
variable that refernces the values in a text box
Try something like
ActiveCell.Value = UserForm1.Controls("textbox1").Value
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"captbluefin" wrote in message
...
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
Reply With Quote
Chip Pearson
View Public Profile
Find all posts by Chip Pearson