Results 1 to 4 of 4

Thread: Best way to read an Excel file?

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    50

    Question

    What's the best way to read an xls-file? Is it possible to read specific cells?

  2. #2
    Lively Member
    Join Date
    Nov 2000
    Posts
    82
    I've got some code that allows us to write to an Excel file, cell-by-cell. It seems to me that the reverse should be easy. It's a long piece of code; more than I want to post here. Send me your email addr and I'll shoot it out to you.

  3. #3
    Junior Member
    Join Date
    Oct 2000
    Posts
    18

    Try This!

    Add the Excel Object Library to the project references.

    Code:
    Sub GetCellValue() 
      Dim sVal as String
      Workbooks.Open FileName:="C:\MyFile.XLS"
      Workbooks.Application.Visible = True
      sVal = Range("A1").Text
      Workbooks.Application.Quit
      Workbooks.Application.DisplayAlerts = False
    End Sub
    This should get you started in the right direction.

  4. #4
    New Member
    Join Date
    Jul 2001
    Location
    Dallas
    Posts
    1

    Email Excel form

    I also have created a form with Excel where I can bring up the form, fill in the blanks on the form and I have put a Command Button on the Excel form so that I can hit the button and email the filled out form to someone.
    I need to know how to write the code for the command button, so when I push it, the filled in form gets mailed. (I don't want to save the filled in form as a file and then send because I have to continually use this form and email different information using the form).
    Can anyone help...?

    thanks
    Barbara

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