ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move Active Cell after Data Validation List (https://www.excelbanter.com/excel-programming/362631-move-active-cell-after-data-validation-list.html)

[email protected]

Move Active Cell after Data Validation List
 
Ay suggestions on how I can get this done?

After I make a selection from a data validation drop down list, I'd
like the active cell to move one row down.

Currently, the active cell stays in the cell with the data validation
drop down.

-M


Ardus Petus

Move Active Cell after Data Validation List
 
You can have this done by following macro, to be pasted in Workbook's code

'-------------------------------------------------------------------------
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If ActiveCell.Validation.Type = xlValidateList Then
ActiveCell.Offset(1, 0).Activate
End If
End Sub

'-------------------------------------------------------------------------

HTH
--
AP

a écrit dans le message de news:
...
Ay suggestions on how I can get this done?

After I make a selection from a data validation drop down list, I'd
like the active cell to move one row down.

Currently, the active cell stays in the cell with the data validation
drop down.

-M




michael

Move Active Cell after Data Validation List
 
Thanks a million HTH! That is working very well for me.

The only problem I'm having now is that after I press Enter on an
active cell (with or without data validation) - the active cell jumps 2
rows down and highlights the cell 1 row down. The highlighting is
enabled by...

Option Explicit
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Excel.Range)
Static OldCell As Range
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 6
Set OldCell = Target
End Sub

Any ideas on how to move the active cell correctly (1 row down) after a
hard return (Enter)?

Thank you.

-M


michael

Move Active Cell after Data Validation List
 
AP - Do you know how I can use the code you provided below AND after a
hard return (Enter) have the active cell go to the cell below, not 2
cells below? Please let me know. Thank you in advance.

-------------------------------------------------------------------------

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
If ActiveCell.Validation.Type = xlValidateList Then
ActiveCell.Offset(1, 0).Activate
End If
End Sub


'-------------------------------------------------------------------------


-M



All times are GMT +1. The time now is 02:34 AM.

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