B
BarakamDeepa
Can anyone tell me if using "for each" has changed in outlook 2002.
The following code worked fine in the previous version and now the
code just stops on the for each line and doesn't even give me an
error. I have run out of ideas. Please let me know what to do.
for each objPage in olkInspec.ModifiedFormPages
if objPage.Name <> "Distribution"
for each objControl in objPage.Controls
y = Mid(objControl.Name,1,3)
If y = "txt" or y = "cbo" or y = "chk" Then
objControl.locked = True
ElseIf y = "cmd" then
if mid(objControl.Name,1,7) <> "cmdHelp" then
objControl.Enabled = False
end if
End if
next
End If
next
The following code worked fine in the previous version and now the
code just stops on the for each line and doesn't even give me an
error. I have run out of ideas. Please let me know what to do.
for each objPage in olkInspec.ModifiedFormPages
if objPage.Name <> "Distribution"
for each objControl in objPage.Controls
y = Mid(objControl.Name,1,3)
If y = "txt" or y = "cbo" or y = "chk" Then
objControl.locked = True
ElseIf y = "cmd" then
if mid(objControl.Name,1,7) <> "cmdHelp" then
objControl.Enabled = False
end if
End if
next
End If
next