Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    L.A., California
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Read-Write Table Cells (2000,xp)

    Hello all,

    I'm trying to find a vba way to read and write cells in a table. The reading part works ok, I take the cell.range.text, and then pull all characters from the end less than ascii 32 (this may be overkill, as I've only seen ascii 7 and 13, but it works.

    The problem is in the writing. If I set a cell's .range.text property to a certain value, say a date (10/30/2003 for example), it only works properly if the cell was empty. Otherwise, I get my value plus the last digit of what was in the cell before. Even if I set the value to "", I end up with the value "3" (plus the ascii 13 & 7 of course), assuming the prior cell text ended with "3".

    HansV, I checked your solution to post 289915, but all it did was what I'm doing, set the cell's .range.text property.

    Isn't there another way to do it?

    TIA

  2. #2
    Star Lounger
    Join Date
    Jan 2001
    Location
    L.A., California
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Read-Write Table Cells (2000,xp)

    Oops, looks like I answered my own question. Before setting the text, if you execute a Table(x).Cell(row,col).Range.Delete,
    that will clear the cell, then you can set the .Range.Text property. Still have to manually pull the ending Ascii 13 & 7 from the .Range.Text when you are READING the cell.

    Thanks anyway,

Posting Permissions

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