T
terilad
Hi,
I have the following macro
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
If Target.Address = Range("S2").Address Then
If MsgBox("Do you want to rotate shift", vbYesNo + vbInformation,
"Galashiels Operational Resources © MN ") <> _
vbYes Then Exit Sub
Dim lngRow As Long
Dim intTemp As Integer
Dim arrData(17) As Variant
Range("N2") = Range("N2") + 7
Range("D4") = Range("D4") + 7
Range("F4") = Range("F4") + 7
Range("H4") = Range("H4") + 7
Range("J4") = Range("J4") + 7
Range("L4") = Range("L4") + 7
Range("N4") = Range("N4") + 7
Range("P4") = Range("P4") + 7
arrData(0) = Range("C37")
For lngRow = 5 To 37 Step 2
intTemp = intTemp + 1
arrData(intTemp) = Range("C" & lngRow)
Range("C" & lngRow) = arrData(intTemp - 1)
Next
Range("C1") = varValue
Range("D6:Q6").ClearContents
Range("D8:Q8").ClearContents
Range("D10:Q10").ClearContents
Range("D12:Q12").ClearContents
Range("D14:Q14").ClearContents
Range("D16:Q16").ClearContents
Range("D18:Q18").ClearContents
Range("D20:Q20").ClearContents
Range("D22:Q22").ClearContents
Range("D24:Q24").ClearContents
Range("D26:Q26").ClearContents
Range("D28:Q28").ClearContents
Range("D30:Q30").ClearContents
Range("D32:Q32").ClearContents
Range("D34:Q34").ClearContents
Range("D36:Q36").ClearContents
Range("D38:Q38").ClearContents
Range("B45:Q45").ClearContents
Range("D6:Q6").Interior.ColorIndex = xlNone
Range("D8:Q8").Interior.ColorIndex = xlNone
Range("D10:Q10").Interior.ColorIndex = xlNone
Range("D12:Q12").Interior.ColorIndex = xlNone
Range("D14:Q14").Interior.ColorIndex = xlNone
Range("D16:Q16").Interior.ColorIndex = xlNone
Range("D18:Q18").Interior.ColorIndex = xlNone
Range("D20:Q20").Interior.ColorIndex = xlNone
Range("D22:Q22").Interior.ColorIndex = xlNone
Range("D24:Q24").Interior.ColorIndex = xlNone
Range("D26:Q26").Interior.ColorIndex = xlNone
Range("D28:Q28").Interior.ColorIndex = xlNone
Range("D30:Q30").Interior.ColorIndex = xlNone
Range("D32:Q32").Interior.ColorIndex = xlNone
Range("D34:Q34").Interior.ColorIndex = xlNone
Range("D36:Q36").Interior.ColorIndex = xlNone
Range("D38:Q38").Interior.ColorIndex = xlNone
Range("B45:Q45").Interior.ColorIndex = xlNone
End If
End Sub
What I am needing to do is when the save icon is pressed or close document I
want a pop up message to say: Are you wanting to save as Week Comm 06 July
2009.
the only thing is I want the date at the end to relate to a cell N2 as this
cell updates with the date of the week commencing. Can any help me with this.
Regards
Mark
I have the following macro
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
If Target.Address = Range("S2").Address Then
If MsgBox("Do you want to rotate shift", vbYesNo + vbInformation,
"Galashiels Operational Resources © MN ") <> _
vbYes Then Exit Sub
Dim lngRow As Long
Dim intTemp As Integer
Dim arrData(17) As Variant
Range("N2") = Range("N2") + 7
Range("D4") = Range("D4") + 7
Range("F4") = Range("F4") + 7
Range("H4") = Range("H4") + 7
Range("J4") = Range("J4") + 7
Range("L4") = Range("L4") + 7
Range("N4") = Range("N4") + 7
Range("P4") = Range("P4") + 7
arrData(0) = Range("C37")
For lngRow = 5 To 37 Step 2
intTemp = intTemp + 1
arrData(intTemp) = Range("C" & lngRow)
Range("C" & lngRow) = arrData(intTemp - 1)
Next
Range("C1") = varValue
Range("D6:Q6").ClearContents
Range("D8:Q8").ClearContents
Range("D10:Q10").ClearContents
Range("D12:Q12").ClearContents
Range("D14:Q14").ClearContents
Range("D16:Q16").ClearContents
Range("D18:Q18").ClearContents
Range("D20:Q20").ClearContents
Range("D22:Q22").ClearContents
Range("D24:Q24").ClearContents
Range("D26:Q26").ClearContents
Range("D28:Q28").ClearContents
Range("D30:Q30").ClearContents
Range("D32:Q32").ClearContents
Range("D34:Q34").ClearContents
Range("D36:Q36").ClearContents
Range("D38:Q38").ClearContents
Range("B45:Q45").ClearContents
Range("D6:Q6").Interior.ColorIndex = xlNone
Range("D8:Q8").Interior.ColorIndex = xlNone
Range("D10:Q10").Interior.ColorIndex = xlNone
Range("D12:Q12").Interior.ColorIndex = xlNone
Range("D14:Q14").Interior.ColorIndex = xlNone
Range("D16:Q16").Interior.ColorIndex = xlNone
Range("D18:Q18").Interior.ColorIndex = xlNone
Range("D20:Q20").Interior.ColorIndex = xlNone
Range("D22:Q22").Interior.ColorIndex = xlNone
Range("D24:Q24").Interior.ColorIndex = xlNone
Range("D26:Q26").Interior.ColorIndex = xlNone
Range("D28:Q28").Interior.ColorIndex = xlNone
Range("D30:Q30").Interior.ColorIndex = xlNone
Range("D32:Q32").Interior.ColorIndex = xlNone
Range("D34:Q34").Interior.ColorIndex = xlNone
Range("D36:Q36").Interior.ColorIndex = xlNone
Range("D38:Q38").Interior.ColorIndex = xlNone
Range("B45:Q45").Interior.ColorIndex = xlNone
End If
End Sub
What I am needing to do is when the save icon is pressed or close document I
want a pop up message to say: Are you wanting to save as Week Comm 06 July
2009.
the only thing is I want the date at the end to relate to a cell N2 as this
cell updates with the date of the week commencing. Can any help me with this.
Regards
Mark