|
-
May 10th, 2001, 07:03 PM
#1
Opening Excel Spreadsheet
Hi
I'm writing a VBA program to open Excel, but I don't know how to open a specific file/spreadsheet to work with.
this is what i have so far...
Dim oApp as Object
set oApp = CreateObject("Excel.Application")
oApp.Visible = true
and i want to open dummy.xls...how do I do this? Thanks!
-Tom
-
May 11th, 2001, 08:36 AM
#2
Re: Opening Excel Spreadsheet
To open an Excel file:
dim oExcel as Object
dim oWorkBook as Object
Sub OpenExcel(szExcelFile as string)
' create Excel Application Object
set oExcel = CreateObject("Excel.Application")
' Open the file
set oWorkBook = oExcel.WorkBooks.Open(szExcelFile)
' show excel
oExcel.Visible = true
End Sub
-Cool Bizs
Good Luck,
-Cool Bizs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|