Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Hello-
I am trying to write a macro that will execute when a user selects a checkbox. When the box is selected, I want the macro to select the table that contains the checkbox and change the background color of the table. I can get the checkbox to execute, but when I try to select the table it gives me a runtime error "4065....command is not available". It appears that is cannot find the table I am referring to.... I am selecting the table and changing the background using the following: ActiveDocument.Tables(4).Shading .BackgroundPatternColor = wdColorGray50 Anyone have any ideas why it is not finding the table? Thanks, Jeff |
#2
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
If Word couldn't find the table, you'd get error 5941 'The requested member
of the collection does not exist'. You're getting the 4065 error because the document is protected for forms, which, amongst other things, prevents you making such changes. You need to unprotect the form, make the changes, then re-protect (NoReset = true) "Jeff Ditty" wrote in message ... Hello- I am trying to write a macro that will execute when a user selects a checkbox. When the box is selected, I want the macro to select the table that contains the checkbox and change the background color of the table. I can get the checkbox to execute, but when I try to select the table it gives me a runtime error "4065....command is not available". It appears that is cannot find the table I am referring to.... I am selecting the table and changing the background using the following: ActiveDocument.Tables(4).Shading .BackgroundPatternColor = wdColorGray50 Anyone have any ideas why it is not finding the table? Thanks, Jeff |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to change text direction of drop down field in table? | Tables | |||
Color change of the gray background of a Word Document | Microsoft Word Help | |||
Word 2003: Can one disable table styles? | Tables | |||
How do I change a tiff background from black to white? | Microsoft Word Help | |||
Word 2003 Table AutoFormat vs Macro vs VBA | Tables |