JustCode : Code to open up an exisiting excel workbook

This code shows us how to open up an existing excel file and select the active workbook.

 
' ****************************************
' Designed by : Smarter Dimensions
' Last Updated : 5th July 2009
' Code to open up an exisiting excel workbook
' ****************************************

Dim oExcel,oWorkBook

Set oExcel = createobject("Excel.Application")

oExcel.Workbooks.Open("C:\TEMP\ExcelExport.xls")

oExcel.Visible = True

oWorkBook = oExcel.ActiveWorkbook

Leave a Comment

%d bloggers like this: