Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Help! Refrence a userform element from a textbox?

How can I refrence the text inside of a textbox through VB coding...

Situation: I have 60 diffrent check boxes. When one of them is
pressed it does the following...

If CheckBox1.Value = True Then
CheckBox1.Enabled = False
TextBox1.Value = "CheckBox1"
End If

I have a commandbutton I would like to enable the checkbox# from
TextBox1 value... I've tried the following but it's probally not even
close.

Private Sub CommandButton1_Click()
Dim LOCK1 as String
LOCK1 = TextBox1.Value
Lock1.enabled = True
Exit Sub
End Sub

How can I get this to work?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Help! Refrence a userform element from a textbox?

This works for oleobjects
Worksheets("sheet1").OLEObjects("ListBox1").Delete


Private Sub CommandButton1_Click()
Dim LOCK1 as String
LOCK1 = TextBox1.Value
activesheet.oleobjects(lock1).enable = true

End Sub


" wrote:

How can I refrence the text inside of a textbox through VB coding...

Situation: I have 60 diffrent check boxes. When one of them is
pressed it does the following...

If CheckBox1.Value = True Then
CheckBox1.Enabled = False
TextBox1.Value = "CheckBox1"
End If

I have a commandbutton I would like to enable the checkbox# from
TextBox1 value... I've tried the following but it's probally not even
close.

Private Sub CommandButton1_Click()
Dim LOCK1 as String
LOCK1 = TextBox1.Value
Lock1.enabled = True
Exit Sub
End Sub

How can I get this to work?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Help! Refrence a userform element from a textbox?

Dim ctrl as Control 'MSForms.Checkbox
Set ctrl = Me.Controls(LOCK1)
ctrl.Enabled = True

--
Tim Zych
SF, CA

wrote in message
...
How can I refrence the text inside of a textbox through VB coding...

Situation: I have 60 diffrent check boxes. When one of them is
pressed it does the following...

If CheckBox1.Value = True Then
CheckBox1.Enabled = False
TextBox1.Value = "CheckBox1"
End If

I have a commandbutton I would like to enable the checkbox# from
TextBox1 value... I've tried the following but it's probally not even
close.

Private Sub CommandButton1_Click()
Dim LOCK1 as String
LOCK1 = TextBox1.Value
Lock1.enabled = True
Exit Sub
End Sub

How can I get this to work?



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
Help! Refrence a userform element from a textbox? [email protected] Excel Programming 0 January 18th 08 09:04 PM
Userform Textbox [email protected] Excel Programming 3 October 21st 07 05:18 PM
TEXTBOX in USERFORM RUUD VAN DEURSEN Excel Programming 5 March 1st 05 03:36 PM
Textbox in userform shaharul[_6_] Excel Programming 3 April 15th 04 12:54 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


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