![]() |
Worksheet_Change doesn't work
In a worksheet named "GUI" I have a drop-down in cell "B15". What I need to
do is as the end user makes a selection change in this drop-down, it runs a macro to recalculate. I am using the code below in the "GUI" worksheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "B15" Then Call SideFundSolve End If End Sub The behavior I'm getting as I watch it in the debugger is it just skips over the Call. What am I doing wrong? |
Worksheet_Change doesn't work
See if this will work for you...
Private Sub Worksheet_Change(ByVal Target As Range) Dim myList As String If Intersect(Target, Range("B15")) Is Nothing Then Else myList = Target.Value MsgBox "B15 Changed" End If End Sub -- Mark Ivey "Dkline" wrote: In a worksheet named "GUI" I have a drop-down in cell "B15". What I need to do is as the end user makes a selection change in this drop-down, it runs a macro to recalculate. I am using the code below in the "GUI" worksheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "B15" Then Call SideFundSolve End If End Sub The behavior I'm getting as I watch it in the debugger is it just skips over the Call. What am I doing wrong? |
Worksheet_Change doesn't work
Try
If Target.Address = "$B$15" Then Mike "Dkline" wrote: In a worksheet named "GUI" I have a drop-down in cell "B15". What I need to do is as the end user makes a selection change in this drop-down, it runs a macro to recalculate. I am using the code below in the "GUI" worksheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "B15" Then Call SideFundSolve End If End Sub The behavior I'm getting as I watch it in the debugger is it just skips over the Call. What am I doing wrong? |
Worksheet_Change doesn't work
Hi There,
Try this Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = Range("B15").Address Then Call SideFundSolve End If HTH Graham Dkline wrote: In a worksheet named "GUI" I have a drop-down in cell "B15". What I need to do is as the end user makes a selection change in this drop-down, it runs a macro to recalculate. I am using the code below in the "GUI" worksheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "B15" Then Call SideFundSolve End If End Sub The behavior I'm getting as I watch it in the debugger is it just skips over the Call. What am I doing wrong? |
Worksheet_Change doesn't work
Making it an absolute reference solved the problem. Thanks.
"Mike H" wrote: Try If Target.Address = "$B$15" Then Mike "Dkline" wrote: In a worksheet named "GUI" I have a drop-down in cell "B15". What I need to do is as the end user makes a selection change in this drop-down, it runs a macro to recalculate. I am using the code below in the "GUI" worksheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "B15" Then Call SideFundSolve End If End Sub The behavior I'm getting as I watch it in the debugger is it just skips over the Call. What am I doing wrong? |
Worksheet_Change doesn't work
Thanks for your help. It's interesting that your solution worked without an
absolute reference. "Mark Ivey" wrote: See if this will work for you... Private Sub Worksheet_Change(ByVal Target As Range) Dim myList As String If Intersect(Target, Range("B15")) Is Nothing Then Else myList = Target.Value MsgBox "B15 Changed" End If End Sub -- Mark Ivey "Dkline" wrote: In a worksheet named "GUI" I have a drop-down in cell "B15". What I need to do is as the end user makes a selection change in this drop-down, it runs a macro to recalculate. I am using the code below in the "GUI" worksheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "B15" Then Call SideFundSolve End If End Sub The behavior I'm getting as I watch it in the debugger is it just skips over the Call. What am I doing wrong? |
Worksheet_Change doesn't work
This worked for me as well. Thanks for the reply.
"Graham" wrote: Hi There, Try this Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = Range("B15").Address Then Call SideFundSolve End If HTH Graham Dkline wrote: In a worksheet named "GUI" I have a drop-down in cell "B15". What I need to do is as the end user makes a selection change in this drop-down, it runs a macro to recalculate. I am using the code below in the "GUI" worksheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "B15" Then Call SideFundSolve End If End Sub The behavior I'm getting as I watch it in the debugger is it just skips over the Call. What am I doing wrong? |
Worksheet_Change doesn't work
Because he is not using the address string, but the Range("B15")
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Dkline" wrote in message ... Thanks for your help. It's interesting that your solution worked without an absolute reference. "Mark Ivey" wrote: See if this will work for you... Private Sub Worksheet_Change(ByVal Target As Range) Dim myList As String If Intersect(Target, Range("B15")) Is Nothing Then Else myList = Target.Value MsgBox "B15 Changed" End If End Sub -- Mark Ivey "Dkline" wrote: In a worksheet named "GUI" I have a drop-down in cell "B15". What I need to do is as the end user makes a selection change in this drop-down, it runs a macro to recalculate. I am using the code below in the "GUI" worksheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "B15" Then Call SideFundSolve End If End Sub The behavior I'm getting as I watch it in the debugger is it just skips over the Call. What am I doing wrong? |
All times are GMT +1. The time now is 09:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com