I have very little knowledge of VBA
I have a macro that I would like to work across multiple worksheets in the same workbook. All worksheets are identical
The code works in the original worksheet but I get an error message in the others. Please help
I appreciate the feedback. Can you please explain how would I set an explicit worksheet qualifier?
Is it possible to attach the file in '.xlsb'?
this is the code
If ActiveSheet.Range("A3").Value = 1 Then
Exit Sub
Else:
Range("A3").Value = Range("A3").Value - 1
LeaveTracker.Columns("B:NI").Hidden = True
LeaveTracker.Range(Columns(Range("A3").Value * 31 - 29), Columns(Range("A3").Value * 31 + 1)).Hidden = False
End If
End Sub
Sub NextMonth()
If ActiveSheet.Range("A3").Value = 12 Then
Exit Sub
Else:
Range("A3").Value = Range("A3").Value + 1
LeaveTracker.Columns("B:NI").Hidden = True
LeaveTracker.Range(Columns(Range("A3").Value * 31 - 29), Columns(Range("A3").Value * 31 + 1)).Hidden = False
End If
End Sub