
Signature
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
i get the
for colnum to 2 to 20 in red
and
Call Msgbox "unable to clear" in red aswell...
did not yet run the code (can only in the morn)
this will give a idea of where i got it pasted in. if any of the cells are
empty then exit the macro so the user can go and fix the closing total. if
they all are good. the macro enter the username and previos days date, print
and call upon another macro to clear the sheet
************************************************************
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
ActiveWorkbook.Save
Sheets("inv 1st page").Select
For ColNum To 2 To 20
If Cells(5, ColNum) <> "" Then
If Cells(23, ColNum) = "" Then
Call Msgbox "All Closing totals not Enterd"
End If
End If
Next ColNum
Sheets("inv 2nd page").Select
For ColNum To 2 To 20
If Cells(5, ColNum) <> "" Then
If Cells(23, ColNum) = "" Then
Call Msgbox "unable to clear"
End If
End If
Next ColNum
Sheets("data capture").Select
Range("O8").Select
ActiveCell.FormulaR1C1 = "=username()"
Range("O11").Select
ActiveCell.FormulaR1C1 = "=now()-1"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("inv 1st page").Select
Range("B2").Select
ActiveCell.FormulaR1C1 = "=username()"
Range("L2").Select
Bob Phillips - 25 Mar 2008 23:35 GMT
That was a typo, it should have been
For ColNum = 2 To 20

Signature
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
>i get the
>
[quoted text clipped - 51 lines]
> ActiveCell.FormulaR1C1 = "=username()"
> Range("L2").Select
Rick Rothstein (MVP - VB) - 26 Mar 2008 09:36 GMT
>i get the
>
> Call Msgbox "unable to clear" in red aswell...
Also a typo. Use either this....
Call MsgBox("unable to clear")
or this...
MsgBox "unable to clear"
Rick