Hi
I'm new to VBA and have managed to cobble this code together thanks to a bit of googling.
I thought it was doing what I want but I've realised it isn't working on all tabs of a spreadsheet, only the tab that is active when the spreadsheet opens. It's saved on 'This Workbook', not an individual sheet.Private Sub Workbook_Open()
BeginRow = 8
EndRow = 10
ChkCol = 5
ChkCol6 = 6
For RowCnt = BeginRow To EndRow
If Cells(RowCnt, ChkCol).Value = "0" And _
Cells(RowCnt, ChkCol6).Text = "-" Then
Cells(RowCnt, ChkCol).EntireRow.Hidden = True
Else
Cells(RowCnt, ChkCol).EntireRow.Hidden = False
End If
Next RowCnt
End Sub
I don't really know what I'm doing so I'm not sure what I need to add to my code to make it work on all of the tabs. Everyone's code is different so Googling only gets me so far.
Any help would be much appreciated.
Bookmarks