I hoping someone can help me with a VBA issue I am having as I am only a novice.

I downloaded a free leave tracker template online. Part of the template includes a calendar which enables you to scroll back and forth between months. A macro is used to make this work. So far I have been able to customize the template to suit my needs.

However, I want to have two leave trackers in the same workbook. To do this I have simply copied the worksheet. When I now go to use the calendar scroll I get the following error:

Run-time error 1004
METHOD ' RANGE' of 'object'_worksheet' failed.

I believe it has something to do with the fact that one macro is now trying to operate two calendar scrolls. I think the following script must be modified to for the calendar scroll to work.

Sub showcalendar()

LeaveTracker.Columns("B:NI").Hidden = True
LeaveTracker.Range(Columns(Range("A3").Value * 31 - 29), Columns(Range("A3").Value * 31 + 1)).Hidden = False
End Sub


I tried to duplicate the module and rename the sub with another name but this did not work. Can someone please suggest how I can have two worksheets using the same calendar scroll. I.e do I need to create two different modules and assign the module to a particular worksheet?

Thank you