J
Joanne
Hello, I have the following subroutine that breaks right after it reaches the
last value of "i" which is 102. I've added watches for every variable in the
routine and all the variables are there. The actual For Loop is working
fine, and the bookmark exists but when I put in a message box, it won't even
go to the message box. I have an identical For Loop higher in the code that
works fine. I'm totally flummoxed by this. Thank you for any help you can
provide.
_________________________________
Public Sub AddBarAdmissionsListInfo(varBookmark As String, varRecords As Long)
Dim i As Integer
Dim strListInformation As String
Dim rng As Range
Set rng = ActiveDocument.Bookmarks(varBookmark).Range
For i = 0 To varRecords
If frmAttyBio.ListBarAdmissions.Selected(i) = True Then
strListInformation = _
strListInformation & frmAttyBio.ListBarAdmissions.list(i)
strListInformation = strListInformation & " | "
End If
Next i
MsgBox "Out of ForLoop"
rng.Text = Left(strListInformation, Len(strListInformation) - 2)
last value of "i" which is 102. I've added watches for every variable in the
routine and all the variables are there. The actual For Loop is working
fine, and the bookmark exists but when I put in a message box, it won't even
go to the message box. I have an identical For Loop higher in the code that
works fine. I'm totally flummoxed by this. Thank you for any help you can
provide.
_________________________________
Public Sub AddBarAdmissionsListInfo(varBookmark As String, varRecords As Long)
Dim i As Integer
Dim strListInformation As String
Dim rng As Range
Set rng = ActiveDocument.Bookmarks(varBookmark).Range
For i = 0 To varRecords
If frmAttyBio.ListBarAdmissions.Selected(i) = True Then
strListInformation = _
strListInformation & frmAttyBio.ListBarAdmissions.list(i)
strListInformation = strListInformation & " | "
End If
Next i
MsgBox "Out of ForLoop"
rng.Text = Left(strListInformation, Len(strListInformation) - 2)