VBA Goto is shifting the view

Jasesair

Active Member
Joined
Apr 8, 2015
Messages
282
Office Version
  1. 2016
I have the below code that works sufficiently but I'm not certain it's actually right for me. F6 has a data validation list. Once something is selected from the list, I want the cursor to move to cell E14 (both on the same sheet). The below code is doing this but is shifting the view so that column E is the left-most. I'd really like this change not to happen so that the user still sees from Column A.

VBA Code:
If Target.Address = Range("$f$6").Address Then
Application.Goto Range("e14"), True
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
.. or this
Rich (BB code):
If Target.Address = Range("$f$6").Address Then
Application.Goto Range("e14"), True

BTW, here is another simplification for your code
Rich (BB code):
If Target.Address = Range("$f$6").Address Then
If Target.Address = "$F$6" Then
 
Upvote 0
Solution
Well, that was a bit simple. Both methods work perfectly!!! Thanks folks.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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