H
hans
I am using this function
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim AllCells As Range
Dim rng As Range
Sheets("Factuur").Select
Range("a21").Select
rijnummer = ActiveCell.Row
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
If IsNumeric(ActiveCell.Value) Then
rijnummer = ActiveCell.Row + 1
End If
Loop
I have no clue but nor rage("a21") nor activecell.offset seems to work.
Has anyone a idear what i am doin wrong?
Thanks Hans
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim AllCells As Range
Dim rng As Range
Sheets("Factuur").Select
Range("a21").Select
rijnummer = ActiveCell.Row
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
If IsNumeric(ActiveCell.Value) Then
rijnummer = ActiveCell.Row + 1
End If
Loop
I have no clue but nor rage("a21") nor activecell.offset seems to work.
Has anyone a idear what i am doin wrong?
Thanks Hans