Select specific location in spreadsheet

D

dhstein

I have a menu set up for a user to get information based on a choice from a
drop down list. The event macro will go to a specific location based on the
choice. The location is in the same worksheet but I have a split window - so
the information to display is on the right while the menu is still on the
left. Right now I use a "GoTo" to go to the appropriate section, but it
doesn't always frame correctly in the display window. For example if the
goto goes to cell Z1, the window might show columns W to Z, but I really
want columns Z to AC. So how do I force the "goto" to set up the window from
Z to AC. I hope I made this clear. Any help is appreciated.
 
T

tompl

You can set the cell that you want in the upper left corner of the
ActiveWindow or the ActivePane with the following language:

ActiveWindow.ScrollRow = 10 ‘Row 10
ActiveWindow.ScrollColumn = 5 ‘Column E

Or:

ActiveWindow.Pane(2).ScrollRow = 10
ActiveWindow.Pane(2).ScrollColumn = 5

You would need to test the “Pane†part because I am not too sure how it
would workin your specific worksheet.

tom
 
T

tompl

Sorry, that needs to be:

ActiveWindow.Panes(2).ScrollRow = 10
ActiveWindow.Panes(2).ScrollColumn = 5

Not:
ActiveWindow.Pane(2).ScrollRow = 10
ActiveWindow.Pane(2).ScrollColumn = 5

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top