Consulting

Results 1 to 3 of 3

Thread: Get value and color of cells with Access

  1. #1

    Get value and color of cells with Access

    Hello
    I would like to know how to get value and color of cells with Access ?
    Thanks :-)

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by bamoo
    Hello
    I would like to know how to get value and color of cells with Access ?
    Thanks :-)
    Do you mean from within Access?

    This might get you started

    Set xlApp = CreateObject("Excel.Application")
        Set xlWB = xlApp.Workbooks.Open("C:\myData\myExcel.xls")
        Set xlWS = xlWB.Worksheets("Sheet1")
        With xlWS.Range("A1")
             MsgBox .value
              MsgBox .Interior.ColorIndex
        End With
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thanks. It's exactly what I wanted :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •