Select problem
What this code does is it looks at teh currently active sheet and it goes to
the first blank row in column A of that sheet. If you wnated a specific sheet
then...
Dim lastRow As Range
Dim A As Range
Private Sub Workbook_Open()
set lastRow = sheets("sheet1").Cells(Rows.Count, "A").End(xlUp).offset(1,0)
set A = lastRow 'not sure why you are doing this...
A.parent.select 'Select the sheet
A.Select
End Sub
--
HTH...
Jim Thomlinson
"Mark J" wrote:
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
|