![]() |
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
|
|||
|
|||
![]()
Hi
We use a custom for that has worked with no problems for many months. However, some users have now moved on to using Outlook 2003. These users get an error message on a particular line of code when opening the form. It is an Object Required error and is on the line: set HRcts = ins.modifiedformpages("HR").controls As I mentioned, this works correctly in Outlook 2000, but not 2003. Interestingly, there are other "set" commands for other pages in the form that do not cause errors either in 2000 or 2003. Here is the code up to that point for reference: dim ins dim cts dim wsh dim xls dim xl2 dim HRcts dim LDcts dim MOBcts dim OTHcts dim XLAppFx Function Item_Open() set ins = item.getinspector ins.hideformpage("HR") ins.hideformpage("Job Desc / Justification") set cts = ins.modifiedformpages("Message").controls set xls = GetObject("\\libsppfps002.uk.liberata.net\procurem ent \ProcurementFormData.xls") set wsh = xls.worksheets("BusArea") for each r in wsh.usedrange.rows cts("cmbBusinessArea").additem r.range("A1").value next ' r cts("cmbBusinessArea").listindex = cts("txtBusinessArea").value cts("cmbBusinessCentre").listindex = cts("txtBusinessCentre").value cts("cmbOperatingUnit").listindex = cts("txtOperatingUnit").value ins.SetCurrentFormPage("Message") set xls = GetObject("\\libsppfps002.uk.liberata.net\procurem ent \ProcurementFormData.xls") set wsh = xls.worksheets("Clients") for each r2 in wsh.usedrange.rows cts("cmbRecharge3").additem r2.range("A1").value next ' r2 cts("cmbRecharge3").listindex = cts("txtRecharge").value ins.SetCurrentFormPage("Message") set HRcts = ins.modifiedformpages("HR").controls I would be very grateful for any help on this. Regards Adam |
Ads |
#2
|
|||
|
|||
![]()
The error suggests that the HR page is not visible at that point in the code.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 wrote in message ... Hi We use a custom for that has worked with no problems for many months. However, some users have now moved on to using Outlook 2003. These users get an error message on a particular line of code when opening the form. It is an Object Required error and is on the line: set HRcts = ins.modifiedformpages("HR").controls As I mentioned, this works correctly in Outlook 2000, but not 2003. Interestingly, there are other "set" commands for other pages in the form that do not cause errors either in 2000 or 2003. Here is the code up to that point for reference: dim ins dim cts dim wsh dim xls dim xl2 dim HRcts dim LDcts dim MOBcts dim OTHcts dim XLAppFx Function Item_Open() set ins = item.getinspector ins.hideformpage("HR") ins.hideformpage("Job Desc / Justification") set cts = ins.modifiedformpages("Message").controls set xls = GetObject("\\libsppfps002.uk.liberata.net\procurem ent \ProcurementFormData.xls") set wsh = xls.worksheets("BusArea") for each r in wsh.usedrange.rows cts("cmbBusinessArea").additem r.range("A1").value next ' r cts("cmbBusinessArea").listindex = cts("txtBusinessArea").value cts("cmbBusinessCentre").listindex = cts("txtBusinessCentre").value cts("cmbOperatingUnit").listindex = cts("txtOperatingUnit").value ins.SetCurrentFormPage("Message") set xls = GetObject("\\libsppfps002.uk.liberata.net\procurem ent \ProcurementFormData.xls") set wsh = xls.worksheets("Clients") for each r2 in wsh.usedrange.rows cts("cmbRecharge3").additem r2.range("A1").value next ' r2 cts("cmbRecharge3").listindex = cts("txtRecharge").value ins.SetCurrentFormPage("Message") set HRcts = ins.modifiedformpages("HR").controls I would be very grateful for any help on this. Regards Adam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2000 works but not Outlook 2002 | Robert Judge | Outlook - Installation | 2 | July 2nd 07 01:00 AM |
OE keeps asking to insert M.S.works 2000, looking wks2000.msi file | nizora | Outlook Express | 6 | June 17th 07 02:50 AM |
Office 2003 works but not outlook | Jeannie | Outlook - Installation | 1 | December 15th 06 10:13 AM |
How Outlook 2003 Stssync works | Pavel Shilov | Outlook - Using Contacts | 5 | March 15th 06 04:21 PM |
Outlook form works on 2003 but not on 2000 | Christian Kjær | Outlook - Using Forms | 2 | January 20th 06 09:48 AM |