i'm using this
...
Set oXLSheet = oXLBook.Worksheets("categorie")
...
now i need to loop column A from row 1 to the and of last cell is blank...
how to?
note:
i'm on VB6
do while not the last cell in column A is blank
-
- PlatinumLounger
- Posts: 4362
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: do while not the last cell in comun A is blank
Code: Select all
Set oXLSheet = oXLBook.Worksheets("categorie")
Dim UltimaRiga As Long
Dim Riga As Long
With oXLSheet
UltimaRiga = .Range("A" & .Rows.Count).End(-4162).Row
For Riga = 1 To UltimaRiga
' Do something with .Range("A" & Riga)
Next Riga
End With
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4362
- Joined: 26 Apr 2010, 17:36
Re: do while not the last cell in comun A is blank
Tks, bro and sorry me but just post a similar question, now found in old email.HansV wrote: ↑17 Jan 2023, 22:10Code: Select all
Set oXLSheet = oXLBook.Worksheets("categorie") Dim UltimaRiga As Long Dim Riga As Long With oXLSheet UltimaRiga = .Range("A" & .Rows.Count).End(-4162).Row For Riga = 1 To UltimaRiga ' Do something with .Range("A" & Riga) Next Riga End With