|
-
Apr 22nd, 2006, 06:55 AM
#1
Thread Starter
New Member
[RESOLVED] diasbling command buttons
hi,
basically i need to have a command button disabled and when i press another button it enables it. also visa versa i need a button which diasbles already enabled command buttons.
any tips?
also, i need to be able to press a button, and any information in a label is then transferred into a list box.
help!
x.
-
Apr 22nd, 2006, 07:10 AM
#2
Re: diasbling command buttons
VB Code:
Private Sub Command2_Click()
If Command1.Enabled = False Then
Command1.Enabled = True
Else
Command1.Enabled = False
End If
End Sub
Private Sub Form_Load()
Command1.Enabled = False
End Sub
-
Apr 22nd, 2006, 07:13 AM
#3
Thread Starter
New Member
Re: diasbling command buttons
that should work out great, thanks!
now i just need to get that "pressing a command button, which transfers text from a lable into a list box" sorted! hehe.
x.
-
Apr 22nd, 2006, 07:20 AM
#4
Re: diasbling command buttons
VB Code:
Private Sub Command2_Click()
Command1.Enabled = Not Command1.Enabled
End Sub
Private Sub Command1_Click()
List1.AddItem Label1.Caption
End Sub
Private Sub Form_Load()
Command1.Enabled = False
End Sub
-
Apr 22nd, 2006, 07:23 AM
#5
Re: diasbling command buttons
your solution at above
keep touch in forums
thanks
-
Apr 22nd, 2006, 07:31 AM
#6
Thread Starter
New Member
Re: diasbling command buttons
the list box works great now, cheers.
i tried the code for the command button and i don't think i explained myself too well, i need let's call it button X to be disabled permanently, until i press button Y which then enables it. then i press button X and it becomes disabled again until i press button Y.
many thanks, you're saving my sanity .
x.
-
Apr 22nd, 2006, 07:38 AM
#7
Re: diasbling command buttons
VB Code:
Private Sub Command2_Click()
Command1.Enabled = True
End Sub
Private Sub Command1_Click()
List1.AddItem Label1.Caption
Command1.Enabled = False
End Sub
Private Sub Form_Load()
Command1.Enabled = False
End Sub
-
Apr 22nd, 2006, 07:44 AM
#8
Thread Starter
New Member
Re: diasbling command buttons
works great!
cheers!!
-
Apr 22nd, 2006, 07:45 AM
#9
Re: diasbling command buttons

Don't forget to mark this thread resolved by using the thread tools just above your first post
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|