mikekhel1987
New Member
- Joined
- Nov 6, 2015
- Messages
- 15
Hi Everyone need your help. I am using combo box to select a group to hide and unhide rows. below is the code that I used
but when I run the code I always get this error:
Run-time error '1004':
Unable to set Hidden property of Range Class
Can please someone help me with my problem. Any help will be greatly appriciated.
Thank You.
Code:
Private Sub ComboBox1_Change() Rows("11:250").Hidden = True
Select Case ComboBox1.Value
Case "All"
Rows("11:250").Hidden = False
Case "All Day"
Rows("11:17").Hidden = False
Case "Budgetlane"
Rows("18").Hidden = False
Case "NG Chain"
Rows("19").Hidden = False
Case "Daily Supermarket"
Rows("20").Hidden = False
Case "Fishermall"
Rows("21").Hidden = False
Case "Landers Superstore"
Rows("22:24").Hidden = False
Case "LCC"
Rows("25:29").Hidden = False
Case "Merkado"
Rows("31:32").Hidden = False
Case "Metro Gaisano"
Rows("33:48").Hidden = False
Case "Pioneer"
Rows("49").Hidden = False
Case "Puregold"
Rows("50:56").Hidden = False
Case "Robinsons"
Rows("57:94").Hidden = False
Case "Rustans"
Rows("95:115").Hidden = False
Case "S&R"
Rows("116:126").Hidden = False
Case "Savemore"
Rows("127:153").Hidden = False
Case "Shopwise"
Rows("154:163").Hidden = False
Case "SM Hypermarket"
Rows("164:191").Hidden = False
Case "SM Supermarket"
Rows("192:224").Hidden = False
Case "South Supermarket"
Rows("225:232").Hidden = False
Case "Landmark"
Rows("233:235").Hidden = False
Case "Waltermart"
Rows("237:250").Hidden = False
End Select
End Sub
Run-time error '1004':
Unable to set Hidden property of Range Class
Can please someone help me with my problem. Any help will be greatly appriciated.
Thank You.