Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB 2005 and Excel

VB 2005 and Excel

Scheduled Pinned Locked Moved Visual Basic
tutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Karma31251
    wrote on last edited by
    #1

    I would like to know how to use a button to open and existing Excel file and just view it.

    M 1 Reply Last reply
    0
    • K Karma31251

      I would like to know how to use a button to open and existing Excel file and just view it.

      M Offline
      M Offline
      MidwestLimey
      wrote on last edited by
      #2

      http://www.google.com/microsoft?hl=en&q=open+excel+document+vb.net[^] It's not hard. Perhaps I should run Google lessons? :-D


      I'm largely language agnostic


      After a while they all bug me :wtf:


      K 1 Reply Last reply
      0
      • M MidwestLimey

        http://www.google.com/microsoft?hl=en&q=open+excel+document+vb.net[^] It's not hard. Perhaps I should run Google lessons? :-D


        I'm largely language agnostic


        After a while they all bug me :wtf:


        K Offline
        K Offline
        koolprasad2003
        wrote on last edited by
        #3

        hello MidwestLimey, try out following ex.. Dim excel As Microsoft.Office.Interop.Excel.Application Dim wb As Microsoft.Office.Interop.Excel.Workbook Try excel = New Microsoft.Office.Interop.Excel.Application wb = excel.Workbooks.Open("c:\\test.xls") excel.Visible = True wb.Activate() Catch ex As COMException MessageBox.Show("Error accessing Excel: " + ex.ToString()) Catch ex As Exception MessageBox.Show("Error: " + ex.ToString()) End Try regards, koolprasad2003:) Be a good listener...Because Opprtunity knoughts softly...N-Joy

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups