View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
hans[_3_] hans[_3_] is offline
external usenet poster
 
Posts: 41
Default activecell.offset does not work

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