View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
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?