chester1993
New Member
- Joined
- Jan 26, 2016
- Messages
- 40
Hello All,
As the title says (i am not sure if this kind of title is allowed, kinda desperate for help), I have a few queries about my current worksheet.
Below is my code for my checkboxes and comboboxes captions to appear on my TextBox3. Shoutout to @DanteAmor for these codes. What I want to add here is add my value from Label2 + TextBox1 and Label3 + TextBox2 to appear on TextBox3 along with the others (checkboxes and comboboxes).
Once all these elements appear on my TextBox3, I want a Reset button to clear the said TextBox. I already have it made, I just want to show it to everyone to check if I need to add anything.
Next, I have a commandbutton which opens a hyperlink of a website. Is there anyway I can open that site using IE instead of Google Chrome without changing my default browser?
Also, the UserForm above is called using a commandbutton on Sheet 1. When I open it, I cannot open Sheet 2 or 3. Is there any way I can open them without closing the UserForm?
Thank you for the answers folks. Sorry for too many questions. Not that good yet in VB. Hehe.
Peace and stay safe everyone!
As the title says (i am not sure if this kind of title is allowed, kinda desperate for help), I have a few queries about my current worksheet.
Below is my code for my checkboxes and comboboxes captions to appear on my TextBox3. Shoutout to @DanteAmor for these codes. What I want to add here is add my value from Label2 + TextBox1 and Label3 + TextBox2 to appear on TextBox3 along with the others (checkboxes and comboboxes).
VBA Code:
Sub FillTextBox()
With TextBox3
.Value = ""
If CheckBox1 Then .Value = .Value & Label1.Caption & " : " & CheckBox1.Caption & vbCr
If CheckBox2 Then .Value = .Value & Label1.Caption & " : " & CheckBox2.Caption & vbCr
If CheckBox3 Then .Value = .Value & Label1.Caption & " : " & CheckBox3.Caption & vbCr
If CheckBox4 Then .Value = .Value & Label1.Caption & " : " & CheckBox4.Caption & vbCr
'
If CheckBox5 Or CheckBox6 Or CheckBox7 Then .Value = .Value & Label4.Caption & vbCr
If CheckBox5 Then .Value = .Value & "• " & CheckBox5.Caption & vbCr
If CheckBox6 Then .Value = .Value & "• " & CheckBox6.Caption & vbCr
If CheckBox7 Then .Value = .Value & "• " & CheckBox7.Caption & vbCr
If CheckBox8 Then .Value = .Value & "• " & CheckBox8.Caption & vbCr
If CheckBox9 Then .Value = .Value & "• " & CheckBox9.Caption & vbCr
If CheckBox10 Then .Value = .Value & "• " & CheckBox10.Caption & vbCr
If CheckBox11 Then .Value = .Value & "• " & CheckBox11.Caption & vbCr
'
If CheckBox12 Or CheckBox13 Or CheckBox14 Then .Value = .Value & Label5.Caption & vbCr
If CheckBox12 Then .Value = .Value & "• " & CheckBox12.Caption & vbCr
If CheckBox13 Then .Value = .Value & "• " & CheckBox13.Caption & vbCr
If CheckBox14 Then .Value = .Value & "• " & CheckBox14.Caption & vbCr
If CheckBox15 Then .Value = .Value & "• " & CheckBox15.Caption & vbCr
If CheckBox16 Then .Value = .Value & "• " & CheckBox16.Caption & vbCr
If CheckBox17 Then .Value = .Value & "• " & CheckBox17.Caption & vbCr
'
If ComboBox1.ListIndex > -1 Then .Value = .Value & Label6.Caption & vbNewLine & "• " & ComboBox1.Value & vbCr
'
If ComboBox2.ListIndex > -1 Then .Value = .Value & Label7.Caption & vbNewLine & "• " & ComboBox2.Value & vbCr
End With
End Sub
Once all these elements appear on my TextBox3, I want a Reset button to clear the said TextBox. I already have it made, I just want to show it to everyone to check if I need to add anything.
VBA Code:
Sub Reset()
''///reset all controls using Function
Me.ComboBox1.ListIndex = -1
Me.TextBox1.Value = Empty
For iX = 1 To 17
Me("CheckBox" & iX) = False
Next iX
End Sub
Next, I have a commandbutton which opens a hyperlink of a website. Is there anyway I can open that site using IE instead of Google Chrome without changing my default browser?
Also, the UserForm above is called using a commandbutton on Sheet 1. When I open it, I cannot open Sheet 2 or 3. Is there any way I can open them without closing the UserForm?
Thank you for the answers folks. Sorry for too many questions. Not that good yet in VB. Hehe.
Peace and stay safe everyone!