Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Textbox Problem
Good afternoon everyone, Quick question. I have a userform that has several textboxes. When am in Visual Basic and using the properties window, I can change th SpecialEffect property. i.e. sunken, flat, etc. What I am wondering is can I change this property using VBA for th textbox? Any ideas are appreciated. Thanks, d -- toocol ----------------------------------------------------------------------- toocold's Profile: http://www.excelforum.com/member.php...fo&userid=3160 View this thread: http://www.excelforum.com/showthread.php?threadid=53299 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Textbox Problem
With Me.TextBox1
.SpecialEffect = fmSpecialEffectSunken End With -- HTH Bob Phillips (remove nothere from email address if mailing direct) "toocold" wrote in message ... Good afternoon everyone, Quick question. I have a userform that has several textboxes. When I am in Visual Basic and using the properties window, I can change the SpecialEffect property. i.e. sunken, flat, etc. What I am wondering is can I change this property using VBA for the textbox? Any ideas are appreciated. Thanks, dw -- toocold ------------------------------------------------------------------------ toocold's Profile: http://www.excelforum.com/member.php...o&userid=31608 View this thread: http://www.excelforum.com/showthread...hreadid=532998 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Textbox Problem
Thanks Bob, exactly what I was looking for. One more question. I have a series of textboxes. Textbox1 through Textbox12. For eac textbox, I want to test something to see if it is true. I am going t use a if then statement. But what I was wondering is can a perso somehow identify the textbox using a variable. I don't want to hav the same code repeated for each textbox. ie. Could I somehow do something like Dim xcount as integer xcount = 12 Do while xcount 0 'unspecified code if statement textbox(xcount).value = something. loop Just curious. This would help me simplify the work greatly. An ideas? Cheers, d -- toocol ----------------------------------------------------------------------- toocold's Profile: http://www.excelforum.com/member.php...fo&userid=3160 View this thread: http://www.excelforum.com/showthread.php?threadid=53299 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Textbox Problem
Dim ctl As Control
For Each ctl In Me.Controls If TypeName(ctl) = "TextBox" Then MsgBox ctl.Name End If Next ctl is one way of getting at all textboxes in a loop -- HTH Bob Phillips (remove nothere from email address if mailing direct) "toocold" wrote in message ... Thanks Bob, exactly what I was looking for. One more question. I have a series of textboxes. Textbox1 through Textbox12. For each textbox, I want to test something to see if it is true. I am going to use a if then statement. But what I was wondering is can a person somehow identify the textbox using a variable. I don't want to have the same code repeated for each textbox. ie. Could I somehow do something like Dim xcount as integer xcount = 12 Do while xcount 0 'unspecified code if statement textbox(xcount).value = something. loop Just curious. This would help me simplify the work greatly. Any ideas? Cheers, dw -- toocold ------------------------------------------------------------------------ toocold's Profile: http://www.excelforum.com/member.php...o&userid=31608 View this thread: http://www.excelforum.com/showthread...hreadid=532998 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Textbox Problem
Thanks Bob, I will give that a shot. Cheers, dw -- toocold ------------------------------------------------------------------------ toocold's Profile: http://www.excelforum.com/member.php...o&userid=31608 View this thread: http://www.excelforum.com/showthread...hreadid=532998 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
TextBox problem in a UserForm | Excel Programming | |||
Text and TextBox problem | Excel Programming | |||
Textbox problem | Excel Programming | |||
Problem with TextBox & ControlSource - Please Help | Excel Programming | |||
TextBox SetFocus Problem | Excel Programming |