Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Change event doesn't work in Excel 97
Hi All;
I am facing one problem regarding the validation. I add in one simple function in Worksheet_Change events and also apply a validation list in a worksheet on cell A1 and in the list got value 1 and 2. When user chooses 1 from the list, the system will prompt The value is one otherwise will prompt The value is not one. This simple program can work properly on Excel 2000 & above, however it doesnt work on Excel 97. I dont know why using Excel 2000 & above, when change the value by mouse click in the cell A1 the corresponding result will prompt automatically. However it doesnt works in Excel 97. Whats wrong for Excel 97? Anyone has got the idea? This is the simple code what I have created. Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Cells(1, 1).Value = 1 Then MsgBox "The value is one" Else MsgBox "The value is not one" End If End Sub Thanks & Regards |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_Change event doesn't work in Excel 97
I believe this is a known issue in xl97, fixed in later
versions. You could use a Forms' Combo box assigned to a macro. Some snippets: Dim cmbo As Shape sID = Application.Caller Set cmbo = ActiveSheet.Shapes(sID) With cmbo.ControlFormat or Dim cmbo As DropDown Set cmbo = ActiveSheet.DropDowns(sID) With cmbo idx = .ListIndex var = = .List(idx) end with Regards, Sandy -----Original Message----- Hi All; I am facing one problem regarding the validation. I add in one simple function in Worksheet_Change events and also apply a validation list in a worksheet on cell ?oA1? and in the list got value 1 and 2. When user chooses 1 from the list, the system will prompt ?oThe value is one? otherwise will prompt ?oThe value is not one?. This simple program can work properly on Excel 2000 & above, however it doesn?Tt work on Excel 97. I don?Tt know why using Excel 2000 & above, when change the value by mouse click in the cell A1 the corresponding result will prompt automatically. However it doesn?Tt works in Excel 97. What?Ts wrong for Excel 97? Anyone has got the idea? This is the simple code what I have created. Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Cells(1, 1).Value = 1 Then MsgBox "The value is one" Else MsgBox "The value is not one" End If End Sub Thanks & Regards . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Worksheet_Change event doesn't work in Excel 97 | Excel Programming | |||
Worksheet_change event | Excel Programming | |||
Worksheet_Change Event | Excel Programming | |||
Worksheet_Change Event | Excel Programming | |||
xl97 and Worksheet_Change event ? | Excel Programming |