PDA

Click to See Complete Forum and Search --> : opening Excel


QWERTY
Nov 17th, 1999, 08:05 AM
Is it possible to open Microsoft Excel from VB and automaticaly open a file in it?
I hope you know what I mean

------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.

Manish
Nov 17th, 1999, 01:40 PM
yes here is the code

using early binding

Dim objexcel As Excel.Application
Set objexcel = New Excel.Application
objexcel.Workbooks.Open ("f:\dep2.xls")
objexcel.Visible = True

using late binding

Dim objexcel As Object
Set objexcel = createobject("excel.application")

objexcel.Workbooks.Open ("f:\dep2.xls")
objexcel.Visible = True

Thanx Manish