ComboBox1_Change - Code

VBABEGINER

Well-known Member
Joined
Jun 15, 2011
Messages
1,284
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,
Dont understand what wrong here..
Code:
Private Sub ComboBox1_Change()
If ComboBox1.Value = "Projects" Or ComboBox1.Value = "Process Training" Or ComboBox1.Value = "Tech Meeting" _
Or ComboBox1.Value = "Allocation" Or ComboBox1.Value = "Stake holder reviews" Or ComboBox1.Value = "Reporting" Or ComboBox1.Value Then
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Neither do we. What problem are you having?
I am assuming there is more to this VBA because you have the IF portion, but THEN ...what?
 
Upvote 0
Hi...Thanks for reply.
Off course, i have code after "Then"..but error stopped at If line...hence given that much only...
Here is the code-
Code:
Private Sub ComboBox1_Change()
If ComboBox1.Value = "Projects" Or ComboBox1.Value = "Process Training" Or ComboBox1.Value = "Tech Meeting" _
Or ComboBox1.Value = "Allocation" Or ComboBox1.Value = "Stake holder reviews" Or ComboBox1.Value = "Reporting" Or ComboBox1.Value Then


TxtCaseID.Visible = False
TxtEETime.Visible = False
cmbClientName.Visible = False
cmbTaskName.Visible = False
cmbTaskStatus.Visible = False


LblCaseID.Visible = False
LblEETime.Visible = False
LblClientName.Visible = False
LblTaskName.Visible = False
LblTaskStatus.Visible = False
End If
End Sub
 
Upvote 0
You don't have a value on the last or...

Code:
If ComboBox1.Value = "Projects" Or ComboBox1.Value = "Process Training" Or ComboBox1.Value = "Tech Meeting" _
Or ComboBox1.Value = "Allocation" Or ComboBox1.Value = "Stake holder reviews" Or ComboBox1.Value = "Reporting" Or [COLOR=#ff0000][B]ComboBox1.Value[/B][/COLOR] Then
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,139
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top