Information générale
Catégorie:
Contrôles ActiveX en VFP
Thanks for the response. In my code I have made excel visible by the command you described (mvFile.Application.Visible = .T.). What I am having trouble with is when opening the spreadsheet in excel, the spreadsheet is hidden. Excel is visible, however to see the spreadsheet you have to go to Window Unhide. I believe I am missing a crucial link between the ActiveX code in VFP and the visual basic code in Excel. I record a macro in Excel and the code will not work under ActiveX VFP.
For example to open a file in Excel returns
Workbooks.Open FileName:="C:\data\Bud00\FS.xls"
ActiveWorkbook.Close
However, when I run this code in VFP
oSheet = CreateObject("Excel.Sheet")
oSheet.Application.Visible=.T.
oSheet.Workbooks.Open FileName:="C:\data\Bud00\FS.xls"
OR
oSheet.Workbooks.Open ("C:\data\Bud00\FS.xls")
I get error messages.
Any suggestions
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement