Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Excel
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Problem with Excel
Divers
Thread ID:
00578968
Message ID:
00578968
Vues:
65
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.......
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform