D
Dan Frederick
I think I've found an MS bug. Can anyone see if I'm doing
something wrong or find a workaround. Keep in mind that
I'd rather keep the Function if at all possible. Here's
the reproducable scenario:
1. In a new sheet, cell A1 set Data Validation on List and
0,1,2,3 as the options. Cell A2 set to =test(A1).
2. In the VB editor, Insert a new module and put the
following code in it:
Function test(a as Integer) as Integer
test = a + 1
End Function
3. On the Sheet1 code page, insert the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Range("B1") = Not Range("B1")
Application.EnableEvents = True
End Sub
4. When you change Cell A1 with the dropdown, B1 doesn't
change. When you type a value in A1, B1 changes.
I think it's a bug. Any other ideas? Can anyone suggest
a way to make this work (without removing the Function
test)?
Thanks,
Dan
something wrong or find a workaround. Keep in mind that
I'd rather keep the Function if at all possible. Here's
the reproducable scenario:
1. In a new sheet, cell A1 set Data Validation on List and
0,1,2,3 as the options. Cell A2 set to =test(A1).
2. In the VB editor, Insert a new module and put the
following code in it:
Function test(a as Integer) as Integer
test = a + 1
End Function
3. On the Sheet1 code page, insert the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Range("B1") = Not Range("B1")
Application.EnableEvents = True
End Sub
4. When you change Cell A1 with the dropdown, B1 doesn't
change. When you type a value in A1, B1 changes.
I think it's a bug. Any other ideas? Can anyone suggest
a way to make this work (without removing the Function
test)?
Thanks,
Dan