After code is run i am unable to use keyboard arrows to move from selected cell

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,731
Office Version
  1. 2007
Platform
  1. Windows
Ive had this before but searching old posts i was unable to find the answer.

I use the following code to select last row with value in column A

My issue is once im taken there i wish to use keyboard arrow to move up a cell or two but nothing happens.
Its as if its locked to that cell ??

I need to then select the cell.
Before the code advise did something that allowed me to use the keyboard arrows to move.

Can you advise please.



VBA Code:
Private Sub BottomOfPage_Click()
    Application.Goto Sheets("DATABASE").Range("A" & Rows.count).End(xlUp), True
    ActiveWindow.SmallScroll UP:=11
End Sub
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
No need for a Subroutine. Just hit CTR+FN+END then hit CTRL+HOME. Takes you to the first column of the last row. If your HOME and END key are not Function keys then I don't think you have to use FN.
 
Upvote 0
The button you are clicking is retaining the focus.
Try this
VBA Code:
Private Sub BottomOfPage_Click()
    Application.GoTo Sheets("DATABASE").Range("A" & Rows.Count).End(xlUp), True
    ActiveWindow.SmallScroll UP:=11
    ActiveCell.Select
End Sub
 
Upvote 0
Solution
@NoSparks that did the trick thanks.

In future if i find another i just need to add
VBA Code:
ActiveCell.Select
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top