![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
I've never seen it work well. When I've used it -- which is rarely -- I've used the index number to iterate the collection.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message oups.com... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Edit Compose Page and Read Page buttons are grayed out | Richard | Outlook - Using Forms | 3 | February 1st 07 08:52 PM |
Attach a page or two of a multi-page Word 2003 document | brett | Outlook Express | 6 | December 12th 06 08:56 PM |
main contact page to be the first page I see when I open outlook | JLebron | Outlook - General Queries | 1 | September 25th 06 06:40 PM |
Help! Inspector.Close is fired before Inspector.Activate handler finishes | Sergey Anchipolevsky | Add-ins for Outlook | 8 | February 9th 06 09:51 AM |
why can't you add a page to a form just like you can add a page to the property page | donald | Outlook - Using Forms | 2 | January 25th 06 10:50 AM |