Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open excel and workbook with VB

Status
Not open for further replies.

mts176

MIS
Apr 17, 2001
109
US
Attempting to Open Excel and an Excel workbook (one right after the other) using Visual Basic through the IFIX HMI package.
 
I'm haven't used IFIX, however this is how you would do it in VB. Any platform that supports VBA should be the same.

Code:
Dim ObjXL As Excel.Application

'create an instance of excel 
Set ObjXL = CreateObject("excel.application") 

'open a workbook 
ObjXL.Workbooks.Open FileName:="C:\SomeWorkBook.xls" 

ObjXL.Workbooks.Close 'Close the file
                          
ObjXL.Quit 'Close the instance of excel in memory
Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top