I use an ActiveX Scroll Bar control to allow a user to scroll among 10 rows that show fruits, with 5 rows/fruits showing at a time.
When he selects a fruit by clicking in the range, rngFruits, a WorkSheetChange event assigns the row number for the selected fruit to valFruit_Row:
[valFruit_Row] = ActiveCell.Row() - TopRow + 1
Then, valFruit_Name, returns the name of the fruit:
=INDEX(rngFruits,valFruit_Row)
So if "Orange," which is on row #3 is selected, I have:
valFruit_Row = 3
valFruit_Name = Orange
When the user uses the scroll bar, valFruit_Row stays the same (as it should) but valFruit_Name changes (as it should). But is there anyway to prevent valFruit_Name from changing? Several displays are based on the currently selected Fruit name, so I'd like it to remain unchanged when the user scrolls among the fruits. Otherwise, the displays update with every click of the scrollbar.
When he selects a fruit by clicking in the range, rngFruits, a WorkSheetChange event assigns the row number for the selected fruit to valFruit_Row:
[valFruit_Row] = ActiveCell.Row() - TopRow + 1
Then, valFruit_Name, returns the name of the fruit:
=INDEX(rngFruits,valFruit_Row)
So if "Orange," which is on row #3 is selected, I have:
valFruit_Row = 3
valFruit_Name = Orange
When the user uses the scroll bar, valFruit_Row stays the same (as it should) but valFruit_Name changes (as it should). But is there anyway to prevent valFruit_Name from changing? Several displays are based on the currently selected Fruit name, so I'd like it to remain unchanged when the user scrolls among the fruits. Otherwise, the displays update with every click of the scrollbar.