Hello!
I am trying to create a timesheet for recording hours worked by staff. I have created command buttons for Annual Leave and Sick Leave with corresponding buttons to remove Annual Leave/Sick leave. If the annual leave button is pressed it will turn the cells purple and merge into one cell. I am trying to do the command button for removing annual leave.
The staff would click on the relevant cell that has the annual leave purple on it and then click this "- Annual Leave button". When clicked, I want the button to copy the formatting from cells S3:U3 to the active cell (because there are numerous conditions working in the background such as change colour for weekends and stay white for weekdays etc). I am trying to do this by recording a macro. My issue is that when I click away from the active cell to copy S3:U3 range, how do I tell the macro what the active cell was? The active cell needs to be the cell active at the start before the command button is pressed.
I hope this makes sense and the below pic helps.
I am trying to create a timesheet for recording hours worked by staff. I have created command buttons for Annual Leave and Sick Leave with corresponding buttons to remove Annual Leave/Sick leave. If the annual leave button is pressed it will turn the cells purple and merge into one cell. I am trying to do the command button for removing annual leave.
The staff would click on the relevant cell that has the annual leave purple on it and then click this "- Annual Leave button". When clicked, I want the button to copy the formatting from cells S3:U3 to the active cell (because there are numerous conditions working in the background such as change colour for weekends and stay white for weekdays etc). I am trying to do this by recording a macro. My issue is that when I click away from the active cell to copy S3:U3 range, how do I tell the macro what the active cell was? The active cell needs to be the cell active at the start before the command button is pressed.
I hope this makes sense and the below pic helps.