Results 1 to 7 of 7

Thread: Help me

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    9

    Post Excel control...

    I begin visual basic and I have a program to write and don't know how to begin. The prog must control an excel spreadsheet and make some treatment in it. I want to make this program extern from excel and thus don't want to use VBA...

    Please help me ...

  2. #2
    New Member
    Join Date
    Mar 2000
    Posts
    3

    Post

    Go to Project References->Microsoft Excel x.0 Library
    check it and now the Excel properties and methods are available to you in your VB Project. Now you can manipulate them as you like.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    9

    Post

    Does this method connect me directly to Excel ?

  4. #4
    Lively Member
    Join Date
    Mar 2000
    Location
    Fort Lauderdale, FL USA
    Posts
    112
    What I did a few years ago when I was first using VB with Excel was to use Excel's Auto Record Macro utility. I would turn on the Auto Record and then do what I wanted done. Then I would go to VBA and cut and paste the code into Visual Basic. Not all the code will work, but it at least helps to get you started with the format.
    Damonous

  5. #5
    Lively Member
    Join Date
    Mar 2000
    Location
    Fort Lauderdale, FL USA
    Posts
    112
    This will open a specific workbook in Excel.

    Public xl As excel.Application
    Public wb As excel.Workbook
    Public ws As excel.Worksheet

    Set xl = CreateObject("excel.application")
    xl.Visible = True
    Set wb = xl.Workbooks.Open(YourWorkbookPath)

    To start a new workbook, change the last line to:

    Set wb = xl.workbooks.add

  6. #6
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Calgary Alberta
    Posts
    359

    Post

    Damonous,

    That's what I first did too! It at lease gave me an idea of how to work with the EXCEL, WORD objects.

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    9

    Post

    Ok, Thank you all for the answers...

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