Thread: Select problem
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Select problem

No, not the FIRST blank row; rather, it goes to the the first blank row
AFTER the last data cell (the distinction matters if you have blank cells
WITHIN your data).

--
Rick (MVP - Excel)


"Mark J" wrote in message
...
Thank you, and will this always go to the first blank row?

"Jim Thomlinson" wrote:

You are using range objects so you need to use set and different
properties...

Dim lastRow As Range
Dim A As Range

Private Sub Workbook_Open()
set lastRow = Cells(Rows.Count, "A").End(xlUp).offset(1,0)
set A = lastRow 'not sure why you are doing this...
A.Select
End Sub

--
HTH...

Jim Thomlinson


"Mark J" wrote:

here is my code;

Dim lastRow As Range
Dim A As Range

Private Sub Workbook_Open()
lastRow = Cells(Rows.Count, "A").End(xlUp).Row + 1
A = lastRow
A.Select
End Sub

can someone tell me what i need to fix to make this work.thanks