PDA

View Full Version : xllastrow range - problem



kubek
10-22-2008, 10:57 PM
Hi does anybody know how to set the xllastrow RANGE for example A20:A30? Because my listbox schows always 10 blank rows - because from A31 my rows are filled in, so i need to range it otherwise... thanks for your advice

With Worksheets(WorksheetName)
xlLastrow = .Cells.Find("*", .Cells(1), xlFormulas, _
xlWhole, xlByRows, xlPrevious).Row

Simon Lloyd
10-22-2008, 11:46 PM
this will give you the last used row in column Axllastrow=.Range("A" & rows.count).end(xlup).row