data entry

M

motocrossed

ok, probably could also be posted in one of the visual basic groups
but, I will start here. I have a very large Word table I use to track
projects, 4 simple columns (great responses here for color codeing and
adding new rows). I prefer not to keep the document open all day and
would like to create a very simple visual basic form that I could use
to update the table, the VB form would stay on my desktop. While
creating the form is not and issue, the VB code to update the table is
beyond my capabilities.

Thanks
 
D

Doug Robbins - Word MVP

Dim mdoc as Document
Dim mtable as Table
Set mdoc = Documents.Open("path\filenameoftablecontainingdocumnet
Set mtable = mdoc.Tables(1)
With mtable
.Rows.Add
.Cell(mtable.Rows.Count, 1).Range.InsertBefore "Dataforfirstcolumn"
.Cell(mtable.Rows.Count, 2).Range.InsertBefore "Dataforsecondcolumn"
'etc'
End with
mdoc.Save
mdoc.Close

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top