ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Scrolling columns in lockstep (https://www.excelbanter.com/excel-programming/410582-scrolling-columns-lockstep.html)

Dudely

Scrolling columns in lockstep
 
I've looked high and low all over the Internet for hours trying to
find an answer but no luck. Keep in mind I'm pretty much a newbie when
it comes to VBA so please be nice.

I need to keep 4 columns/cells in lockstep with each other as one of
them is scrolled. For example, I have one column for street address, a
second for city, a third for state and a forth for zip. When I scroll
the address textbox, I want city, state and zip to also scroll. When I
select a particular address, the city, state and zip associated with
that address in the other columns should also be selected
(highlighted).

Essentially this is exactly what Excel itself does - but I'm trying to
do it on a userform.

Any clues as to how to implement that in VBA 6 (and Excel 2000)?

Thank you

John Bundy

Scrolling columns in lockstep
 
I'm a bit confused, you say you have columns and cells that you can scroll,
then you say that they are textboxes. Are you scrolling by using a scrollbar
or just moving up and down? are you scrolling on the page and the textbox is
updated with the current value? Do you mean a listbox or combobox?

If you can answer those that should do it, basically you want to set that
when one changes index, the others change to the same index.

--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Dudely" wrote:

I've looked high and low all over the Internet for hours trying to
find an answer but no luck. Keep in mind I'm pretty much a newbie when
it comes to VBA so please be nice.

I need to keep 4 columns/cells in lockstep with each other as one of
them is scrolled. For example, I have one column for street address, a
second for city, a third for state and a forth for zip. When I scroll
the address textbox, I want city, state and zip to also scroll. When I
select a particular address, the city, state and zip associated with
that address in the other columns should also be selected
(highlighted).

Essentially this is exactly what Excel itself does - but I'm trying to
do it on a userform.

Any clues as to how to implement that in VBA 6 (and Excel 2000)?

Thank you



All times are GMT +1. The time now is 04:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com