J
Jerry
Hello,
And first,,,,THANKS for your time, help, and advise!!!!
EXCEL97 is Application.Version 8.0
After creating some changes in a User Form with 2 list
boxes to modify data (ListBox1 and ListBox2), the action
of changing data in the second list box began to produce
unexpected results. There are varing results depending on
wether a CLICK, or a MouseUp, or a MouseDown event was
used in the code to modify the data that set in ListBox2.
The major error using MouseUp Action is:
IPF in FM20.DLL at 137:600025c4
The original code was stripped down to a short example and
was able to produce the same IPF in FM20.DLL at
137:600025c4.
The code below has two list boxes in one User Form. The
UserForm sets a 7 column list with 45 rows to ListBox1 and
a 2 Column list in ListBox2. Some data is populated to
ListBox1 (7 columns 45 rows). When a row in ListBox1 is
selected that row is set to a 2 column array and then put
in ListBox2 which is a 2 Column structure with 7 rows.
The code below simply tries to reset the data in ListBox2
and then exit the SUB Action of ListBox2_MouseUp. The
logic is successful but the END SUB causes the IPF in
FM20.DLL.
Using the Microsoft support search web page for
the "FM20.DLL" produces some indication this is a known
problem but I could not find anything pointing to a fix
for the version of EXCEL that is being used (EXCEL97
Application.Version 8.0)
Any advise would be TERRIFIC!!!!!
'****************START of CODE****************
Dim TimeSheetArray(44, 6) As String
Dim TimeRecordArray(6, 2) As String
Private Sub ListBox1_MouseUp(ByVal Button As Integer,
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)
Resul = MsgBox("Select OK to Modify this record, CANCEL to
Select another Record.", vbOKCancel)
If Resul = "2" Then
Exit Sub
End If
'
'Store the fields selected in this 7 column record to
'the TimeRecordArray a 2 column structure!
'
Rowi = ListBox1.ListIndex
' r c
TimeRecordArray(0, 0) = "A:"
TimeRecordArray(0, 1) = TimeSheetArray(Rowi, 0)
TimeRecordArray(1, 0) = "B:"
TimeRecordArray(1, 1) = TimeSheetArray(Rowi, 1)
TimeRecordArray(2, 0) = "C:"
TimeRecordArray(2, 1) = TimeSheetArray(Rowi, 2)
TimeRecordArray(3, 0) = "D:"
TimeRecordArray(3, 1) = TimeSheetArray(Rowi, 3)
TimeRecordArray(4, 0) = "E:"
TimeRecordArray(4, 1) = TimeSheetArray(Rowi, 4)
TimeRecordArray(5, 0) = "F:"
TimeRecordArray(5, 1) = TimeSheetArray(Rowi, 5)
TimeRecordArray(6, 0) = "G:"
TimeRecordArray(6, 1) = TimeSheetArray(Rowi, 6)
'
'Put the 2 column array structure in a two column listbox
'
'
MsgBox ListBox2.ListCount
ListBox2.List() = TimeRecordArray
MsgBox ListBox2.ListCount
End Sub
Private Sub ListBox2_MouseUp(ByVal Button As Integer,
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)
Dim i As Integer
'****Test*************************************
'
MsgBox "Clearing the ListBox2 List Box!!!"
'Clear out the TimeRecordArray for the next selection
'
'For i = 0 To 6
' 'EditTimeRecord.Column(0, i) = ""
' 'EditTimeRecord.Column(1, i) = ""
' TimeRecordArray(i, 0) = "Help: "
' TimeRecordArray(i, 1) = " "
'Next i
' r c
TimeRecordArray(0, 0) = "Col1:"
TimeRecordArray(0, 1) = ""
TimeRecordArray(1, 0) = "Col2:"
TimeRecordArray(1, 1) = ""
TimeRecordArray(2, 0) = "Col3:"
TimeRecordArray(2, 1) = ""
TimeRecordArray(3, 0) = "Col4:"
TimeRecordArray(3, 1) = ""
TimeRecordArray(4, 0) = "Col5:"
TimeRecordArray(4, 1) = ""
TimeRecordArray(5, 0) = "Col6:"
TimeRecordArray(5, 1) = ""
TimeRecordArray(6, 0) = "Col7:"
TimeRecordArray(6, 1) = ""
'
'Change the data in ListBox2(???).
'
MsgBox ListBox2.ListCount
ListBox2.List() = TimeRecordArray
MsgBox ListBox2.ListCount
MsgBox "Trying to exit Listbox2 Action (Click, MouseUp,
etc."
'****************************************
End Sub 'Here is where the IPF occurs!!!!!!!!!!!!
Private Sub UserForm_Activate()
ListBox1.ColumnCount = 7
ListBox2.ColumnCount = 2
For i = 0 To 43
TimeSheetArray(i, 0) = "A" & i
TimeSheetArray(i, 1) = "B" & i
TimeSheetArray(i, 2) = "F" & i
TimeSheetArray(i, 3) = "G" & i
TimeSheetArray(i, 4) = "H" & i
TimeSheetArray(i, 5) = "I" & i
TimeSheetArray(i, 6) = "J" & i
Next i
'
'Now, put the TimeSheet data to modify in the
'ListBox1.
'
ListBox1.List() = TimeSheetArray
End Sub
'****************End of CODE****************
Thanks for your time, help and advise!!!!
Jerry
And first,,,,THANKS for your time, help, and advise!!!!
EXCEL97 is Application.Version 8.0
After creating some changes in a User Form with 2 list
boxes to modify data (ListBox1 and ListBox2), the action
of changing data in the second list box began to produce
unexpected results. There are varing results depending on
wether a CLICK, or a MouseUp, or a MouseDown event was
used in the code to modify the data that set in ListBox2.
The major error using MouseUp Action is:
IPF in FM20.DLL at 137:600025c4
The original code was stripped down to a short example and
was able to produce the same IPF in FM20.DLL at
137:600025c4.
The code below has two list boxes in one User Form. The
UserForm sets a 7 column list with 45 rows to ListBox1 and
a 2 Column list in ListBox2. Some data is populated to
ListBox1 (7 columns 45 rows). When a row in ListBox1 is
selected that row is set to a 2 column array and then put
in ListBox2 which is a 2 Column structure with 7 rows.
The code below simply tries to reset the data in ListBox2
and then exit the SUB Action of ListBox2_MouseUp. The
logic is successful but the END SUB causes the IPF in
FM20.DLL.
Using the Microsoft support search web page for
the "FM20.DLL" produces some indication this is a known
problem but I could not find anything pointing to a fix
for the version of EXCEL that is being used (EXCEL97
Application.Version 8.0)
Any advise would be TERRIFIC!!!!!
'****************START of CODE****************
Dim TimeSheetArray(44, 6) As String
Dim TimeRecordArray(6, 2) As String
Private Sub ListBox1_MouseUp(ByVal Button As Integer,
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)
Resul = MsgBox("Select OK to Modify this record, CANCEL to
Select another Record.", vbOKCancel)
If Resul = "2" Then
Exit Sub
End If
'
'Store the fields selected in this 7 column record to
'the TimeRecordArray a 2 column structure!
'
Rowi = ListBox1.ListIndex
' r c
TimeRecordArray(0, 0) = "A:"
TimeRecordArray(0, 1) = TimeSheetArray(Rowi, 0)
TimeRecordArray(1, 0) = "B:"
TimeRecordArray(1, 1) = TimeSheetArray(Rowi, 1)
TimeRecordArray(2, 0) = "C:"
TimeRecordArray(2, 1) = TimeSheetArray(Rowi, 2)
TimeRecordArray(3, 0) = "D:"
TimeRecordArray(3, 1) = TimeSheetArray(Rowi, 3)
TimeRecordArray(4, 0) = "E:"
TimeRecordArray(4, 1) = TimeSheetArray(Rowi, 4)
TimeRecordArray(5, 0) = "F:"
TimeRecordArray(5, 1) = TimeSheetArray(Rowi, 5)
TimeRecordArray(6, 0) = "G:"
TimeRecordArray(6, 1) = TimeSheetArray(Rowi, 6)
'
'Put the 2 column array structure in a two column listbox
'
'
MsgBox ListBox2.ListCount
ListBox2.List() = TimeRecordArray
MsgBox ListBox2.ListCount
End Sub
Private Sub ListBox2_MouseUp(ByVal Button As Integer,
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)
Dim i As Integer
'****Test*************************************
'
MsgBox "Clearing the ListBox2 List Box!!!"
'Clear out the TimeRecordArray for the next selection
'
'For i = 0 To 6
' 'EditTimeRecord.Column(0, i) = ""
' 'EditTimeRecord.Column(1, i) = ""
' TimeRecordArray(i, 0) = "Help: "
' TimeRecordArray(i, 1) = " "
'Next i
' r c
TimeRecordArray(0, 0) = "Col1:"
TimeRecordArray(0, 1) = ""
TimeRecordArray(1, 0) = "Col2:"
TimeRecordArray(1, 1) = ""
TimeRecordArray(2, 0) = "Col3:"
TimeRecordArray(2, 1) = ""
TimeRecordArray(3, 0) = "Col4:"
TimeRecordArray(3, 1) = ""
TimeRecordArray(4, 0) = "Col5:"
TimeRecordArray(4, 1) = ""
TimeRecordArray(5, 0) = "Col6:"
TimeRecordArray(5, 1) = ""
TimeRecordArray(6, 0) = "Col7:"
TimeRecordArray(6, 1) = ""
'
'Change the data in ListBox2(???).
'
MsgBox ListBox2.ListCount
ListBox2.List() = TimeRecordArray
MsgBox ListBox2.ListCount
MsgBox "Trying to exit Listbox2 Action (Click, MouseUp,
etc."
'****************************************
End Sub 'Here is where the IPF occurs!!!!!!!!!!!!
Private Sub UserForm_Activate()
ListBox1.ColumnCount = 7
ListBox2.ColumnCount = 2
For i = 0 To 43
TimeSheetArray(i, 0) = "A" & i
TimeSheetArray(i, 1) = "B" & i
TimeSheetArray(i, 2) = "F" & i
TimeSheetArray(i, 3) = "G" & i
TimeSheetArray(i, 4) = "H" & i
TimeSheetArray(i, 5) = "I" & i
TimeSheetArray(i, 6) = "J" & i
Next i
'
'Now, put the TimeSheet data to modify in the
'ListBox1.
'
ListBox1.List() = TimeSheetArray
End Sub
'****************End of CODE****************
Thanks for your time, help and advise!!!!
Jerry