Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
TextBox problem in a UserForm SailFL Excel Programming 4 August 22nd 05 10:51 PM
Text and TextBox problem Stuart[_5_] Excel Programming 3 July 26th 04 12:52 AM
Textbox problem Robert Couchman[_4_] Excel Programming 11 February 26th 04 02:01 PM
Problem with TextBox & ControlSource - Please Help [email protected] Excel Programming 8 January 14th 04 06:45 AM
TextBox SetFocus Problem Tom Ogilvy Excel Programming 1 September 12th 03 01:27 PM


All times are GMT +1. The time now is 04:00 AM.

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"