ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   urgent..how to go to the next row (https://www.excelbanter.com/excel-programming/293018-urgent-how-go-next-row.html)

shirley

urgent..how to go to the next row
 
With the code below, i managed to go to the last row on a click of th
button. However, i want to be directed to the empty row just below th
last row when i click the button. How should i go about doing it?

Dim mysheet As Worksheet
Set mysheet = ActiveSheet

mysheet.Cells(ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
1).Activat

--
Message posted from http://www.ExcelForum.com


Frank Kabel

urgent..how to go to the next row
 
Hi
one way:
mysheet.Cells(ActiveSheet.Cells(Rows.Count,
"A").End(xlUp).Row,1).offset(1,0).Activate

--
Regards
Frank Kabel
Frankfurt, Germany

With the code below, i managed to go to the last row on a click of

the
button. However, i want to be directed to the empty row just below

the
last row when i click the button. How should i go about doing it?

Dim mysheet As Worksheet
Set mysheet = ActiveSheet

mysheet.Cells(ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row,
1).Activate


---
Message posted from http://www.ExcelForum.com/



Bob Phillips[_6_]

urgent..how to go to the next row
 
Hi Shirley,

Lots of ways. Here is one

mysheet.Cells(ActiveSheet.Cells(Rows.Count,
"A").End(xlUp).Row+1,"A").Activate

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"shirley " wrote in message
...
With the code below, i managed to go to the last row on a click of the
button. However, i want to be directed to the empty row just below the
last row when i click the button. How should i go about doing it?

Dim mysheet As Worksheet
Set mysheet = ActiveSheet

mysheet.Cells(ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row,
1).Activate


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com