Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA
How to? referencing table with differing number of cells per row
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="ker_01, post: 5883485"] I have a table that has 17 /or/ 19 rows, and some rows have 2 cells, while others have 3. I think that the best way to cycle through the table to pull every value is something like: For EachColumn = 1 to 19 For EachRow = 1 to 3 'do stuff Next EachRow Next EachColumn but I need to only "do stuff" if that cell actually exists; right now it hits the first row where there are 2 cells instead of three, and throws a runtime error 5941 "the requested member of the collection does not exist". What is the appropriate syntax to determine if the table cell exists before I try to process anything related to that cell? Something like: If MyWordDocument.Tables(1).Cell(EachRow, EachColumn).Exists then... Many thanks! Keith [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA
How to? referencing table with differing number of cells per row
Top