My workbook has worksheets for each month, a report sheet and a "Roster" sheet.
I currently have a macro that allows me to (while on a month worksheet such as 'January') double click a cell in range to auto enter "10".
I would like to alter this so when double clicking, instead of entering "10", the value of Roster!O11 is entered instead.
The code also allows me to double click the cell containing "10" to clear the value, so this would also need to refer to Roster!O11.
Any help would be much appreciated.
The following is the Worksheet code in its entirety:
I currently have a macro that allows me to (while on a month worksheet such as 'January') double click a cell in range to auto enter "10".
I would like to alter this so when double clicking, instead of entering "10", the value of Roster!O11 is entered instead.
The code also allows me to double click the cell containing "10" to clear the value, so this would also need to refer to Roster!O11.
Any help would be much appreciated.
The following is the Worksheet code in its entirety:
VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("B3:AF29")) Is Nothing Then
If Target.Value = "" Then
Target.Value = "10"
Target.Offset(1, 0).Select
ElseIf Target.Value <> "" And Target.Value = "10" Then
Target.Value = ""
Target.Offset(1, 0).Select
End If
End If
End Sub