Below is the a portion of code from a procedure I wrote and it keeps throwing a compile error: NEXT without FOR ...
Apparently I'm missing something ... can anyone see something I may be missing .... thanks so much!
~gwoman
For Each itm In ritms
If itm.Class = olAppointment Then
i = i + 1
'j is the column number
j = 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtCoFacilitatorName") <> "" Then
rng.Value = itm.UserProperties("txtCoFacilitatorName")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtCostAvoidance") <> "" Then
rng.Value = itm.UserProperties("txtCostAvoidance")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtCostReduction") <> "" Then
rng.Value = itm.UserProperties("txtCostReduction")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtEventShortDescription") <> "" Then
rng.Value = itm.UserProperties("txtEventShortDescription")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtFreeText") <> "" Then
rng.Value = itm.UserProperties("txtFreeText")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtHyperlinkEventFolder") <> "" Then
rng.Value = itm.UserProperties("txtHyperlinkEventFolder")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtHyperlinkScopingDoc") <> "" Then
rng.Value = itm.UserProperties("txtHyperlinkScopingDoc")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtImprovementArea") <> "" Then
rng.Value = itm.UserProperties("txtImprovementArea")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtKaizenFacilitator") <> "" Then
rng.Value = itm.UserProperties("txtKaizenFacilitator")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtKaizenStatus") <> "" Then
rng.Value = itm.UserProperties("txtKaizenStatus")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtLDTPresent") <> "" Then
rng.Value = itm.UserProperties("txtLDTPresent")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtProcessTeam") <> "" Then
rng.Value = itm.UserProperties("txtProcessTeam")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtQuarterOccuring") <> "" Then
rng.Value = itm.UserProperties("txtQuarterOccuring")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("chkBoxReminder") <> "" Then
rng.Value = itm.UserProperties("chkBoxReminder")
j = j + 1
Set rng = wks.Cells(i, j)
On Error Resume Next
End If
j = j + 1
End If
i = i + 1
Next itm
Apparently I'm missing something ... can anyone see something I may be missing .... thanks so much!
~gwoman
For Each itm In ritms
If itm.Class = olAppointment Then
i = i + 1
'j is the column number
j = 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtCoFacilitatorName") <> "" Then
rng.Value = itm.UserProperties("txtCoFacilitatorName")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtCostAvoidance") <> "" Then
rng.Value = itm.UserProperties("txtCostAvoidance")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtCostReduction") <> "" Then
rng.Value = itm.UserProperties("txtCostReduction")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtEventShortDescription") <> "" Then
rng.Value = itm.UserProperties("txtEventShortDescription")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtFreeText") <> "" Then
rng.Value = itm.UserProperties("txtFreeText")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtHyperlinkEventFolder") <> "" Then
rng.Value = itm.UserProperties("txtHyperlinkEventFolder")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtHyperlinkScopingDoc") <> "" Then
rng.Value = itm.UserProperties("txtHyperlinkScopingDoc")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtImprovementArea") <> "" Then
rng.Value = itm.UserProperties("txtImprovementArea")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtKaizenFacilitator") <> "" Then
rng.Value = itm.UserProperties("txtKaizenFacilitator")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtKaizenStatus") <> "" Then
rng.Value = itm.UserProperties("txtKaizenStatus")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtLDTPresent") <> "" Then
rng.Value = itm.UserProperties("txtLDTPresent")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtProcessTeam") <> "" Then
rng.Value = itm.UserProperties("txtProcessTeam")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("txtQuarterOccuring") <> "" Then
rng.Value = itm.UserProperties("txtQuarterOccuring")
j = j + 1
Set rng = wks.Cells(i, j)
If itm.UserProperties("chkBoxReminder") <> "" Then
rng.Value = itm.UserProperties("chkBoxReminder")
j = j + 1
Set rng = wks.Cells(i, j)
On Error Resume Next
End If
j = j + 1
End If
i = i + 1
Next itm