General information
Category:
ActiveX controls in 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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only