View Single Post
  #2  
Old February 14th 06, 03:02 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default CODE working in 2003 but not in 2002

Which statement raises the error?

--
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


"gobjob" wrote in message ...
Does anyone know why this code is working in Outlook 2003 but not in Outlook
2002 SP3.

Sub Commandbutton18_Click
Set ExcelSheet = CreateObject("Excel.Application")
Set Sheet = ExcelSheet.Workbooks.Add("t:\Shared\Purchase Outlook
Forms\POletter.xls")
ExcelSheet.DisplayAlerts = False
ExcelSheet.visible = True
ExcelSheet.Cells(4,2) = NOW()
ExcelSheet.ActiveSheet.Protect

End sub

The error message only says, "Operation Failed."
ExcelSheet.Cells(5,2) = Item.UserProperties.find("Order Number").Value
ExcelSheet.Cells(7,2) = Item.UserProperties.find("(1) Requested by").Value
ExcelSheet.Cells(17,2) = Item.UserProperties.find("Ship to").Value

--
Gloriann O'Brien

Ads