Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 08-19-2019, 03:58 AM
sts023 sts023 is offline Inserting a Table using VBA Windows 7 64bit Inserting a Table using VBA Office 2010
Hopeless Idiot
Inserting a Table using VBA
 
Join Date: Apr 2019
Location: God's Own County
Posts: 26
sts023 is on a distinguished road
Default

Thanks Greg - very informative.

As a practicing idiot, I make the following remark with a great deal of trepidation!

I think there's an oversite in your code.

Sorry!

I think
Code:
    oTbl.Range.Cells(1).Range.Text = "BBB"
should be
Code:
    oTbl.Range.Cells(1).Range.Text = "AAA"
and when executing the code in a document with three varyingly sized tables. the first two loops change Cells(1) to the new letters in each table, but the third loop only changes the Cells(1) in the first table.
Unfortunately I haven't yet grasped exactly what's going on, so if I'm right (which is by no means certain), I can't suggest a correction for the third loop.

Believe me, this is not a vanity comment.
I use sample code from Forums to help me to learn techniques and good practices, so if there IS a bug it would be helpful to future browsers to correct it, and if there ISN'T a bug, an explanation of why my my comments are wrong could prevent other people from making the same mistake.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
syntax for inserting blank line before inserting table and after a line or paragraph SamDsouza Word VBA 8 08-04-2019 11:10 PM
Inserting graphic in last table lodi123 Word VBA 2 07-07-2017 06:48 AM
Inserting a Table using VBA Inserting a table using ADD command snufse Word VBA 1 11-10-2015 03:28 PM
Inserting a Table using VBA Inserting table natasha_arriell Mail Merge 4 06-04-2014 12:13 AM
Inserting a table Katelyn Outlook 0 04-05-2012 09:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft