Hi,
I'm quite new at VBA and I'm trying to hide certain sections of a spreadsheet if two cells don't equal a certain text i.e (multiple items). The intial code of developed is:
If Range("B5").Activate = "(Multiple Items)"
and Range("B6").Activate ="(Multiple Items)"
Then
Rows("56:58").Select
Selection.EntireRow.Hidden = False
Else
Rows("56:58").Select
Selection.EntireRow.Hidden = True
However this code breaks down at the first line. Does anyone know the correct code and also what needs to be done so the code activates automatically?
Many thanks,
Neil
I'm quite new at VBA and I'm trying to hide certain sections of a spreadsheet if two cells don't equal a certain text i.e (multiple items). The intial code of developed is:
If Range("B5").Activate = "(Multiple Items)"
and Range("B6").Activate ="(Multiple Items)"
Then
Rows("56:58").Select
Selection.EntireRow.Hidden = False
Else
Rows("56:58").Select
Selection.EntireRow.Hidden = True
However this code breaks down at the first line. Does anyone know the correct code and also what needs to be done so the code activates automatically?
Many thanks,
Neil