Results 1 to 2 of 2

Thread: opening Excel

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523

    Post

    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.


  2. #2
    Lively Member
    Join Date
    Apr 1999
    Location
    India
    Posts
    73

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width