Need VB code to navigate user to new view/range

emadams

New Member
Joined
Aug 8, 2007
Messages
14
Hi! I am working on an excel model for a client, so I need for it to be extremely user friendly.

I am trying to use the double click on the command button to send the user to a new range of cells. In other words, they will start with a view of one range of cells in which there are a number of inputs requested of them. Once they have completed all of the necessary inputs, I would like for them to double click the command button, which should then take them to the next section of inputs.

How do I write a VB code that will actually change the view/focus? I have tried to use Range(cells).select, but that hasn't worked for me. I am new at this, so maybe I did not enter the code quite right.

Please help!

Thank you in advance,
Emily
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
What will they be viewing to start with and where do you want them to end up?
 
Upvote 0
Emily

Take a look at Application.Goto.
Code:
Application.Goto Worksheets("Sheet1").Range("Z50"), Scroll:=True
 
Upvote 0
Let's say they are starting at Sheet1 range A1:P36, and I would like for them to end up at Sheet1 range A50:P86.

I'm just making up a range here to use as an example.
 
Upvote 0
Application.Goto seems to work just fine.

I knew that there must be a simple solution for this!

Thanks a bunch!
 
Upvote 0

Forum statistics

Threads
1,213,482
Messages
6,113,908
Members
448,532
Latest member
9Kimo3

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