Hello:
I need a VB Code to go to last occupied cell in column A in sheets "ClockInOut" when i open the excel file.
Please let me know if you have any questions.
Thanks.
Riz
Hello:
I need a VB Code to go to last occupied cell in column A in sheets "ClockInOut" when i open the excel file.
Please let me know if you have any questions.
Thanks.
Riz
Hi,
Here is code that will activate the last cell with data in Column A when the workbook is opened.
Hope that helps,![]()
Private Sub Workbook_Open() lastrow = Range("A" & Rows.Count).End(xlUp).Row Range("A" & lastrow).Activate End Sub
Dan
You might want to add the sheet name into make sure it goes to the bottom of the correct sheet
![]()
Private Sub Workbook_Open() Sheets("Clockinout").Select lastrow = Range("A" & Rows.Count).End(xlUp).Row Range("A" & lastrow).Activate End Sub
Happy with my advice? Click on the * reputation button below
Another:
![]()
Private Sub Workbook_Open() Dim ws As Worksheet Set ws = Sheets("ClockInOut") Application.Goto ws.Range("A" & ws.Range("A" & Rows.Count).End(3).row), True End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks