excel2007 macro problem?
Macro problem: Can anyone arrange this macro.?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngAudit As Range
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 49 Then
If (Target.Row - 5) Mod 41 = 0 Then
Application.EnableEvents = False
Set rngAudit = Range("AJ" & Target.Row + 1)
Do Until rngAudit.Value = "" Or rngAudit.Row > (Target.Row + 23)
Set rngAudit = rngAudit.Offset(2, 0)
Loop
If rngAudit.Value = "" Then
rngAudit.Value = Target.Value
rngAudit.Offset(0, -33).Value = Now
End If
Application.EnableEvents = True
End If
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 49 Then
If (Target.Row - 25) Mod 41 = 0 Then
Application.EnableEvents = False
Set rngAudit = Range("d" & Target.Row - 19)
Do Until rngAudit.Value = "" Or rngAudit.Row > (Target.Row + 3)
Set rngAudit = rngAudit.Offset(2, 0)
Loop
If rngAudit.Value = "" Then
rngAudit.Value = Target.Value
End If
Application.EnableEvents = True
End If
End If
For i = 0 To 10300
If Target.Address = "$AW" & "$" & i And Target.Cells.Formula <> "" Then
MsgBox ("Please enter OR in Cell: " & "AW" & i + 20)
End If
Next i
ActiveWindow.SelectedSheets.PrintOut
ActiveWindow.SelectedSheets.PrintOut
End Sub
Problem:
1. If Target.Address = "$AW" & "$" & i And Target.Cells.Formula <> "" Then
MsgBox ("Please enter OR in Cell: " & "AW" & i + 20) = THE PRINTING SHOULD START AFTER THIS FORMULA WILL BE DONE OR AFTER I TYPE A VALUES ON AW25, AW66, AW107 AND SO ON..
2. Set rngAudit = Range("AJ" & Target.Row + 1)
Do Until rngAudit.Value = "" Or rngAudit.Row > (Target.Row + 23)
Set rngAudit = rngAudit.Offset(2, 0) = PLEASE EFFECT THIS AFTER PRINTING 2 COPIES.
Please help guys I really need this macro it will save a lot of time in my work. I will appreciate your efforts. Thanks..
Comments
Just how exactly is this related to Photography??
I do believe you would have more luck in a computer section of YA instead of in Photography.