The following sub written by Marc Nutter for me worked earlier, but now produces an error:
Dim Pos1, Pos2 As Integer
Dim Temp, ThisBN, ThisCN, ThisCNN As String
Dim TrimXMLLine As String
TrimXMLLine = Trim ( XMLLine )
If LeftB ( TrimXMLLine, 9 ) = "<ObjName>" _
And InStr ( XMLLInes ( XMLLineNumber - 1 ) , "<block type=" ) <> 0 Then
Temp = BetweenTags ( XMLLine, "<ObjName>" )
If Trim ( Temp ) <> "" Then
If BuildingBookmarks Then /// mn
If CurrentModule <> Temp Then /// mn
CurrentBookmark = New Bookmark ( Temp, BookmarkLines ) /// mn
BookmarksListBox.AddFolder Temp /// mn
BookmarksListBox.CellTag ( BookmarksListBox.LastIndex, 0 ) = CurrentBookmark
End If /// mn
End If /// mn
CurrentModule = Temp
CurrentControl = ""
CurrentMenuItem = ""
CurrentMethod = ""
End If
End If
If LeftB ( TrimXMLLine, 12 ) = "<block type=" Then
BlockNumber = BlockNumber + 1
ControlNumber = - 1
Pos1 = 14
Pos2 = InStr ( Pos1, TrimXMLLine, Q )
Temp = Mid1 ( TrimXMLLine, Pos1, Pos2 - 1 )
If Trim ( Temp ) <> "" Then
CurrentModule = ""
ModuleType = Temp
CurrentControl = ""
CurrentMenuItem = ""
CurrentMethod = ""
End If
End If
If LeftB ( TrimXMLLine, 17 ) = "<ControlBehavior>" Then
ControlNumber = ControlNumber + 1
If ControlNumber > - 1 Then
ThisBN = Str ( BlockNumber )
If Len ( ThisBN ) = 1 Then ThisBN = "0" + ThisBN
ThisCN = Str ( ControlNumber )
If Len ( ThisCN ) = 1 Then ThisCN = "0" + ThisCN
ThisCNN = ThisBN + ThisCN
CurrentControl = ControlName ( Val ( ThisCNN ) )
End If
CurrentMenuItem = ""
CurrentMethod = ""
End If
If LeftB ( TrimXMLLine, 13 ) = "<MenuHandler>" Then
Temp = Trim ( XMLLInes ( XMLLineNumber + 1 ) )
Pos1 = 11
Pos2 = InStrB ( 12, Temp, "<" ) - 1
CurrentControl = ""
CurrentMenuItem = Mid1 ( Temp, Pos1, Pos2 )
CurrentMethod = ""
End If
This seems to be the particular line which causes the problem:
BookmarksListBox.AddFolder Temp /// mn
How do I prevent the error (which never occurred before)? Any advice will be much appreciated.
(I no longer know how to get in touch with Marc.)
Warm regards,
Barry Traver