Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Richard Richard is offline
external usenet poster
 
Posts: 150
Default Creating an "Add" button

In Word 2003 is there a way to create a button on a form that would add
another line to a table for additional entries?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Creating an "Add" button

There are two methods shown at http://www.gmayor.com/word_vba_examples.htm.
They insert an extra row on exit from the last field in the table, but could
be easily modified to run from a button if preferred.
See also http://www.gmayor.com/SelectFile.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Richard wrote:
In Word 2003 is there a way to create a button on a form that would
add another line to a table for additional entries?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Richard Richard is offline
external usenet poster
 
Posts: 150
Default Creating an "Add" button

The second option works great, however, the document that I want to attach
this macro to contains 9 separate tables and this macro inserts the new row
on only the first table. Is there a way for me to assign this macro to
specific tables in the document? In particular I need it to run on two
different tables in the document.

"Graham Mayor" wrote:

There are two methods shown at http://www.gmayor.com/word_vba_examples.htm.
They insert an extra row on exit from the last field in the table, but could
be easily modified to run from a button if preferred.
See also http://www.gmayor.com/SelectFile.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Richard wrote:
In Word 2003 is there a way to create a button on a form that would
add another line to a table for additional entries?




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Creating an "Add" button

If by the second option, you mean the second option from the first linke
then the tables are addressed by number i.e.
Set oTable = .Tables(1)
will access Table1
Set oTable = .Tables(2)
will access Table 2 etc

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Richard wrote:
The second option works great, however, the document that I want to
attach this macro to contains 9 separate tables and this macro
inserts the new row on only the first table. Is there a way for me
to assign this macro to specific tables in the document? In
particular I need it to run on two different tables in the document.

"Graham Mayor" wrote:

There are two methods shown at
http://www.gmayor.com/word_vba_examples.htm. They insert an extra
row on exit from the last field in the table, but could be easily
modified to run from a button if preferred.
See also http://www.gmayor.com/SelectFile.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Richard wrote:
In Word 2003 is there a way to create a button on a form that would
add another line to a table for additional entries?



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Richard Richard is offline
external usenet poster
 
Posts: 150
Default Creating an "Add" button

That did the trick. Thanks. I am, however, getting a Runtime error 4248
when I run it.

"Graham Mayor" wrote:

If by the second option, you mean the second option from the first linke
then the tables are addressed by number i.e.
Set oTable = .Tables(1)
will access Table1
Set oTable = .Tables(2)
will access Table 2 etc

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Richard wrote:
The second option works great, however, the document that I want to
attach this macro to contains 9 separate tables and this macro
inserts the new row on only the first table. Is there a way for me
to assign this macro to specific tables in the document? In
particular I need it to run on two different tables in the document.

"Graham Mayor" wrote:

There are two methods shown at
http://www.gmayor.com/word_vba_examples.htm. They insert an extra
row on exit from the last field in the table, but could be easily
modified to run from a button if preferred.
See also http://www.gmayor.com/SelectFile.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Richard wrote:
In Word 2003 is there a way to create a button on a form that would
add another line to a table for additional entries?






  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Creating an "Add" button

What changes *exactly* have you made to the posted code? Which line is
flagged as in error?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Richard wrote:
That did the trick. Thanks. I am, however, getting a Runtime error
4248 when I run it.

"Graham Mayor" wrote:

If by the second option, you mean the second option from the first
linke then the tables are addressed by number i.e.
Set oTable = .Tables(1)
will access Table1
Set oTable = .Tables(2)
will access Table 2 etc

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Richard wrote:
The second option works great, however, the document that I want to
attach this macro to contains 9 separate tables and this macro
inserts the new row on only the first table. Is there a way for me
to assign this macro to specific tables in the document? In
particular I need it to run on two different tables in the document.

"Graham Mayor" wrote:

There are two methods shown at
http://www.gmayor.com/word_vba_examples.htm. They insert an extra
row on exit from the last field in the table, but could be easily
modified to run from a button if preferred.
See also http://www.gmayor.com/SelectFile.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Richard wrote:
In Word 2003 is there a way to create a button on a form that
would add another line to a table for additional entries?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I want idMso for "Mailing" Tab button to add this button in custom ribbon tab [email protected] Microsoft Word Help 0 August 6th 07 06:40 AM
I want idMso for "Mailing" Tab button to add this button in custom ribbon tab [email protected] New Users 0 August 3rd 07 03:47 PM
Word Forms (2003) - creating a "click here to SAVE" button [email protected] Microsoft Word Help 2 April 3rd 07 06:58 AM
Creating a "print current page" macro or button David B. Appleton Microsoft Word Help 4 February 17th 07 08:25 AM
creating a "word" version of the lotus wordpro "smartmaster" Steve Taylor Microsoft Word Help 2 November 23rd 05 05:39 AM


All times are GMT +1. The time now is 09:57 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"