CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Excel question

  1. #1
    Join Date
    Jul 2001
    Location
    Salzburg, Austria
    Posts
    126

    Excel question

    Hi!
    I have an excel file in which I have defined a few fields with a name (f.e. the cell A1 is called TEST).
    I open this file with Excel.aplication object. Normally I would refer to A1 cell in the file like this:

    xlBook.Worksheets.Application.Cells(1,1)

    does anybody knows how can I refer to my cell TEST without using A1 (in this case)?
    Thanks in advance.
    Jaime.


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Excel question

    You can refference it using the range object
    xlBook.Worksheets.Application.Range("TEST")

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Jul 2001
    Location
    Salzburg, Austria
    Posts
    126

    Re: Excel question

    It works great!
    Thanks a lot.
    Jaime.


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

Featured