Hello Oz, I am looking for a VB script that will select/activate the cell below the last (most recently) selected cell in an excel table column.
My excel table is named "offices_tbl" and the column I want to work with is called "office address".
I.e. Range("offices_tbl[office address]")
I am already using the worksheet change event to perform an action when a cell is selected within the column, as shown below, but I would like to add buttons to the page so users can increment the selection up/down.
[VBA]Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("offices_tbl[office address]")) Is Nothing Then 'for cells not selected:
Range("offices_tbl[office address]").Interior.ColorIndex = xlColorIndexNone ' set color to default/nothing
With Range("offices_tbl[office address]") 'when a cell is selected do this:
Range("F4").Value = ActiveCell.Value 'copy cell value to F4
With Selection.Interior 'change interior cell colour to
.Color = 6750207 'light yellow
Application.Run "StartJob1" 'and run Job1
Note: the user may have selected another cell in another column, so the current ActiveCell may not be within the target range when they press the button(s)!
As always, any help/tips to accomplish this greatly appreciated!!!
PS I am not looking for a spin button/toggle type solution at the moment, I have to use two buttons, one for up, one for down.