ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   worksheet change and cases (https://www.excelbanter.com/excel-worksheet-functions/8089-worksheet-change-cases.html)

Mike R.

worksheet change and cases
 
Hello,
I am trying to use the worksheet_change with cases, but seem to be having
problems. I would like for various cases to run when the data in B8 changes.
I have 10 difference cases. Any help would be appreciated. Thank you in
advance.
Mike

Frank Kabel

Hi
you may post your current code as describe what exact probelms you have

--
Regards
Frank Kabel
Frankfurt, Germany

Mike R. wrote:
Hello,
I am trying to use the worksheet_change with cases, but seem to be
having problems. I would like for various cases to run when the data
in B8 changes. I have 10 difference cases. Any help would be
appreciated. Thank you in advance.
Mike




Bob Phillips

Private Sub Worksheet_Change(ByVal Target As Range)

With Target
If .Address = "$B$8" Then
Select Case .Value
Case "value 1": 'action 1
Case "value 2": 'action 2
'etc.
End Select
End If
End With

End Sub


--
HTH

-------

Bob Phillips
"Mike R." wrote in message
...
Hello,
I am trying to use the worksheet_change with cases, but seem to be having
problems. I would like for various cases to run when the data in B8

changes.
I have 10 difference cases. Any help would be appreciated. Thank you in
advance.
Mike





All times are GMT +1. The time now is 05:30 PM.

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