Results 1 to 29 of 29

Thread: VB to open An Existing Excel Workbook

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2010
    Posts
    272

    Re: VB to open An Existing Excel Workbook

    I am running that exact code, I copied/pasted it into my Visual Studio to see if it would work for me

  2. #2
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: VB to open An Existing Excel Workbook

    Quote Originally Posted by Jo15765 View Post
    I am running that exact code, I copied/pasted it into my Visual Studio to see if it would work for me
    Well that explains it. Change:

    workbook = xls.Workbooks.Open("C:\...")

    to point at your file.

    You might be better served by reviewing this tutorial:

    http://vb.net-informations.com/

    Go to the section on VB.NET Excel 2007 Tutorials.

    Last time I was there all the examples worked as posted. I'm on VS 2012 some some tweaks were needed but it will give you a bigger picture.

    Also look at:

    http://www.vbforums.com/showthread.p...6-(or-VB5-VBA)

    It is VB 6.0 but the principles are the same.
    Last edited by TysonLPrice; May 1st, 2013 at 05:03 AM.

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