|
-
May 22nd, 2006, 01:27 AM
#1
Thread Starter
Member
[RESOLVED] how to enable/disable text box based on radio button value?
Hi i have 2 radio buttons,
i) default value
ii) specify value
and 3 textboxes
i)width
ii)height
iii)size
the 3 texboxes are placed within a frame
Now if the user chooses default value, i wan to gray out the 3 texboxes and disable them. However, when the user selects specify value, onli then will i enable the 3 textboxes. It can be done using IF THEN statements, however, which SUB should i place my statements in?
-
May 22nd, 2006, 01:43 AM
#2
Thread Starter
Member
Re: how to enable/disable text box based on radio button value?
thks but i got the answer already
just put the statements in the radio button 's click SUB will do..
thks
-
May 22nd, 2006, 01:46 AM
#3
Re: how to enable/disable text box based on radio button value?
VB Code:
Option Explicit
Private Sub Option1_Click()
If Option1.Value = True Then
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
End If
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 3rd, 2015, 12:51 PM
#4
Junior Member
Re: [RESOLVED] how to enable/disable text box based on radio button value?
I know it is very very old thread but i am looking the similar solution but i want to hide instead of enable/disable, how can i hide the textbox and label.. Please help?
-
Sep 3rd, 2015, 03:23 PM
#5
Re: [RESOLVED] how to enable/disable text box based on radio button value?
Set the visible property instead of the enabled property.
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
|