Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Value of Excel Cell (VBA Word XP)

    Is it possible for VBA to "read" the value of a cell in and Excel spreadsheet?

    Thanks,
    Richard Barrett

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Value of Excel Cell (VBA Word XP)

    Yes, use Range, e.g.

    x = Range("A22")

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Re: Value of Excel Cell (VBA Word XP)

    I'm not sure I follow, and that's possibly because I wasn't clear with my question. I want to read the value of this cell from a Word VBA application. Thus the spreadsheet is not open.

    Can I use your suggestion along with a file name?

    Thanks.

  4. #4
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Brussels, Brussel, Belgium
    Posts
    159
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Value of Excel Cell (VBA Word XP)

    hi Richard,

    here's an example from the word mvp site:
    http://www.mvps.org/word/FAQs/InterD...XLFromWord.htm
    if you have more question don't hesitate to post back.

    greetings, pieter.

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Value of Excel Cell (VBA Word XP)

    You have to access Excel via Excel Object.
    I expect that the example at the mvp site will point the way.

Posting Permissions

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