ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   data validation, mouse action of select... then move right (https://www.excelbanter.com/excel-programming/440052-data-validation-mouse-action-select-then-move-right.html)

cate

data validation, mouse action of select... then move right
 
I have a cell that uses a combobox selector to input data (data
validation). I'd like the active cell to move right after the
selection is made. Is that possible? I can setup the enter key to
advance this way or that, but I can't figure out how to setup a mouse
action like this.

Thank you.

Gary''s Student

data validation, mouse action of select... then move right
 
Say you are entering data into cell B9 with some code. After the cell has
been filled, how about :

Range("C9").Select

or in the general case, if you are filling MyCell, then afterwards:

MyCell.Offset(0,1).Select
--
Gary''s Student - gsnu201001


"cate" wrote:

I have a cell that uses a combobox selector to input data (data
validation). I'd like the active cell to move right after the
selection is made. Is that possible? I can setup the enter key to
advance this way or that, but I can't figure out how to setup a mouse
action like this.

Thank you.
.


[email protected][_2_]

data validation, mouse action of select... then move right
 
Rigt click on the sheet tab and click "view code".
Copy below code and paste it on the code window.
A6 as the cell with validation. Change it to your cell address.
-------------------------------------------------------

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A6")) Is Nothing Then
Target.Offset(0, 1).Select
End If
End Sub


All times are GMT +1. The time now is 07:38 PM.

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