Results 1 to 3 of 3

Thread: Importing cell info from EXCEL

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Posts
    32

    Post

    You can use DDE by setting the Linktopic, Linkitem and Linkmode properties.

    Alternatively , you can use OLE Automation to achieve this.
    With DDE,
    Set Linktopic = excel|sheet1
    linkitem = r1c1
    linkmode = automatic

    You can also dynamically change the linkitems to access diff. cells.

    Hope this is useful


  2. #2
    Hyperactive Member billwagnon's Avatar
    Join Date
    Jul 1999
    Location
    St. Louis, Missouri, Mississippi Valley
    Posts
    290

    Post

    Public myXL As Object

    Sub LoadInformationFromExcel()

    Dim strActiveCell As String

    Set myXL = CreateObject("Excel.Application")

    myXL.Visible = True
    myXL.Workbooks.Open FileName:="C:\1231Plans.xls" 'your file name here

    With myXL
    .Workbooks("1231plans.xls").Activate
    .Range("a2").Select 'or whatever
    strActiveCell = .ActiveCell
    'other operations / routines
    End With

    myXL.Quit

    Set myXL = Nothing

    End Sub

    Be sure to set your Excel reference on the project.

    [This message has been edited by billwagnon (edited 11-08-1999).]

  3. #3
    New Member
    Join Date
    Nov 1999
    Posts
    1

    Post

    Please send a sample of code to access a cell in a EXCEL spreadsheet. What is the easiest way to do this? Thanks.

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