View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default onClick action from cell selection

Assume you are talking about Data=Validation using the List option and this
is Excel 2000 or later. Further assume that the cell in question is B9

right click on the sheet tab of the sheet with this cell and select view
code. Paste in code like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If target.count 1 then exit sub
if target.address = "$B$9" then
if target.Value = "Yes" then
Worksheets(3).Activate
elseif Target.Value = "No" then
Worksheets(4).Activate
end if
End if
End Sub

--
Regards,
Tom Ogilvy


"Beanymonster " wrote in
message ...
Hi All,
In a worksheet I am creating I have a cell which, using a list,
contains the options <please select, Yes and No. I would like it that
if a user selects YES, they are automatically taken to worksheet 3 but
is they select No, they are taken to worksheet 4. Is that possible?
If it makes any difference, I also have conditional formatting on the
cell selection.

Many thanks in advance


---
Message posted from http://www.ExcelForum.com/