Results 1 to 2 of 2

Thread: Exit a table cell and write to document below table just created

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Posts
    23

    Exit a table cell and write to document below table just created

    Does anyone know how to move focus out of a table after you write data to a cell. I tried placing a bookmark after the table & it works but its no good since i'd need to place loads into the template and i don;t know how many rows the recordset will return each time.

    I tried Sendkeys "{DOWN}{DOWN}" but that does nothing, whereas thats what u would do if typing into the document manually.

    Basically - i need to move the focus - or cursor to the line after the table i'm moving through in code.

    real frustrating cos it probably a one liner...

    any ideas?

  2. #2
    New Member
    Join Date
    Dec 2003
    Posts
    1
    Why not:

    -Populate your table
    -Count the rows
    VB Code:
    1. rowNo = myTable.Rows.Count
    -Select the last row
    VB Code:
    1. rowNo = myTable.Rows(rowNo).Select
    -Move the cursor down

    I've done it a few times where a quick and dirty solution was needed.

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