ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,747
- Office Version
- 2007
- Platform
- Windows
Hi,
Im working on a userform where the user will enter 6 separate values in 6 separate textboxes followed by a letter which will be entered in textbox7
Currently Textbox 7 value is taken from the user selected option button1 "G" or option button2 "M"
Now 99.9% of the time this value will be G
So im trying to limit the amount of unnecessary clicks on the task for the user & to always have textbox7 value set at G unless the user overides it for M
Any advice for how to get this working.
The lines of code below are what i am using at present to put a value in textbox7
Once a value is entered & after a 2 second delay the userform values are pasted to my worksheet.
It can be as basic as having G as textbox 7 default UNLESS option button M is selected within x amount of seconds to then override textbox7 value otherwise just continue with the default
Thanks
Im working on a userform where the user will enter 6 separate values in 6 separate textboxes followed by a letter which will be entered in textbox7
Currently Textbox 7 value is taken from the user selected option button1 "G" or option button2 "M"
Now 99.9% of the time this value will be G
So im trying to limit the amount of unnecessary clicks on the task for the user & to always have textbox7 value set at G unless the user overides it for M
Any advice for how to get this working.
The lines of code below are what i am using at present to put a value in textbox7
Once a value is entered & after a 2 second delay the userform values are pasted to my worksheet.
It can be as basic as having G as textbox 7 default UNLESS option button M is selected within x amount of seconds to then override textbox7 value otherwise just continue with the default
Thanks
Rich (BB code):
Private Sub TextBox7_Change()
TextBox7 = UCase(TextBox7)
If TextBox7.Value <> 0 Then
Application.Wait (Now + TimeValue("0:00:02")) ' DELAY BEFORE CODE IS TRANSFERED
Call DISCOCODE
End If
End Sub
Private Sub OptionButton1_Click() ' UK PCB REMOTE
If OptionButton1.Value = True Then
TextBox7.Visible = True
TextBox7.Value = "G"
End If
End Sub
Private Sub OptionButton2_Click() ' UK SUSPENSION REMOTE
If OptionButton2.Value = True Then
TextBox7.Visible = True
TextBox7.Value = "M"
End If
End Sub