Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Excel
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Problem with Excel
Miscellaneous
Thread ID:
00578968
Message ID:
00578968
Views:
66
Hi All,
I have developed an application in VFP5 on a win98 platform. One of its functions is to write to an excel file - CreateObject etc etc..

On my machine in both the development and exe environment all works ok. However when I tested on the users machine as soon as it starts excel I get the error message:

OLE IDispath exception Code 1004 from Microsoft Excel. Unable to Set the PrintQuality property of the PageSetUp Class!

Does anyone have any ideas please! Both machines are running the same version of win98 and excel.

* CODE SNIPPET IS AS FOLLOWS
if isnull(loXl)
loXl = CreateObject('Excel.Application')
endif
if isnull(loXl)
=messagebox('Could not start Excel application - Electronic Pro_Forma not created!',64,'Unable to Start XL')
select (nSelect)
return .t.
endif

#Define msoTextOrientationHorizontal 1
#Define msoTrue .T.

with loXl
.Workbooks.Add && Add a New One
* Format The Cells

.Columns("A:A").Select
.Selection.ColumnWidth = 19.43
With loXL.Selection.Font
.Name = "Arial"
.Size = 9
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
ETC.......
Next
Reply
Map
View

Click here to load this message in the networking platform