ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   general validation question (https://www.excelbanter.com/excel-programming/305743-general-validation-question.html)

JohnE

general validation question
 
I was thinking of using the validation (list) in a
spreadsheet but before I get started there are a few
questions.
1) if using the list, is it possible to have language so
the activecell moves to another cell when the validation
is selected?
2) to go along with #1, can language be used with a
validation at all?
3) if coding language can be used with a validation, can
you give an example to get me started?
Thank to anyone who responds.
*** John

tod

general validation question
 
There are no events associated with Data Validation lists.
However, you can use the Worksheet Change event, like this:

'Assuming your list is in cell B2, this will make cell
'B10 the active cell.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$2" Then
ActiveSheet.Range("B10").Activate
End If
End Sub

tod

-----Original Message-----
I was thinking of using the validation (list) in a
spreadsheet but before I get started there are a few
questions.
1) if using the list, is it possible to have language so
the activecell moves to another cell when the validation
is selected?
2) to go along with #1, can language be used with a
validation at all?
3) if coding language can be used with a validation, can
you give an example to get me started?
Thank to anyone who responds.
*** John
.


Bob Phillips[_6_]

general validation question
 
John,

1) This sort of thing?

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Address = "$E$4" Then
With Target
.Offset(0, 4).Activate
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


2) Don't understand the question and so with 3)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"JohnE" wrote in message
...
I was thinking of using the validation (list) in a
spreadsheet but before I get started there are a few
questions.
1) if using the list, is it possible to have language so
the activecell moves to another cell when the validation
is selected?
2) to go along with #1, can language be used with a
validation at all?
3) if coding language can be used with a validation, can
you give an example to get me started?
Thank to anyone who responds.
*** John





All times are GMT +1. The time now is 12:23 AM.

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