Invoking a workbook from a Fortran Program!

A

aiyer

Hello all!

A quick question.
I have a workbook (Vtec.xls) that has macro buttons and custom create
menus and stuff performing different tasks.
I would like to invoke/call 'vtec.xls' from a Fortran code.
Is there any way we could do this?
Any alternatives?

I would really appreciate any help in this matter.

Thanks a bunch.

regds,
Arun.

Vt Corp
 
P

...Patrick

Hello,
for me (i m not specialist) it is possible to read in your sheet xl, but not
write...
I have a problem with Reflection to readin xl and this is the superbe
reponse from Bill Manville:

I don't know anything about Reflection, but I would try using
automation. Create a Reference from your Reflection's VBproject to
Microsoft Excel N Object Library.

Dim oXL As Excel.Application
Dim V
Dim I As Integer
Set oXL = New Excel.Application
oXL.Workbooks.Open "C:\Mybook.xls"
For I=1 To 50
V = oXL.Sheets("Sheet1").Cells(I, 1).Value
' do what you will with that value V in Reflection
Next
oXL.ActiveWorkbook.Close False
oXL.Quit
Set oXL = Nothing

If you can deal with the data being in an array you could replace the
For loop with
V = oXL.Sheets("Sheet1").Range("A1:A50").Value

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top