Shenhav
12-30-2012, 04:05 AM
Hi, I'm new to this forum.
I have a word doc (2003) which allows the user to run a macro to create tables.
Each table contains some form fields which he can write into, and 2 checkboxes, to check Male/Female.
After the file is complete, i need the vba code to scan the file and realize which boxes were checked and to which table they belong.
I tried working with bookmakrs of course, but the problem is that the bookmarks, which were originally given specifically to the checkboxes, refer to the WHOLE CELL.
thus, they don't show the True/False values.
Also, i noticed that when a table is created, another set of bookmarks is automatically given to the checkboxes (beside the bookmakrs which were intentionally given by code).
these bookmarks DO refer to the true/false value, but the number which are given to them is impossible to follow.
This is because a user can decide to insert a table between tables 2 and 3 for example. His new table checkboxes' bookmakrs will get the last numbers, as this example shows:
Before a table was inserted between 3 and 4:
table 1: Check1, Check2
table 2: Check3, Check4,
table 3: Check5, Check6
table 4: Check7, Check8
After a table was inserted between 3 and 4:
table 1: Check1, Check2
table 2: Check3, Check4,
table 3: Check9, Check10
table 4: Check5, Check6
table 5: Check7, Check8
I'm really stuck :help
Do you have any ideas how can I ultimately connect between a checkbox to a table?
I have a word doc (2003) which allows the user to run a macro to create tables.
Each table contains some form fields which he can write into, and 2 checkboxes, to check Male/Female.
After the file is complete, i need the vba code to scan the file and realize which boxes were checked and to which table they belong.
I tried working with bookmakrs of course, but the problem is that the bookmarks, which were originally given specifically to the checkboxes, refer to the WHOLE CELL.
thus, they don't show the True/False values.
Also, i noticed that when a table is created, another set of bookmarks is automatically given to the checkboxes (beside the bookmakrs which were intentionally given by code).
these bookmarks DO refer to the true/false value, but the number which are given to them is impossible to follow.
This is because a user can decide to insert a table between tables 2 and 3 for example. His new table checkboxes' bookmakrs will get the last numbers, as this example shows:
Before a table was inserted between 3 and 4:
table 1: Check1, Check2
table 2: Check3, Check4,
table 3: Check5, Check6
table 4: Check7, Check8
After a table was inserted between 3 and 4:
table 1: Check1, Check2
table 2: Check3, Check4,
table 3: Check9, Check10
table 4: Check5, Check6
table 5: Check7, Check8
I'm really stuck :help
Do you have any ideas how can I ultimately connect between a checkbox to a table?