Re: Multiple Tables

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Doug,

The lines I’m having problems with are these:
ActiveDocument.Tables(1).Cell(ii, 1).Range = UserForm1.ListBox2.List(i, 0)
ActiveDocument.Tables(1).Cell(ii, 2).Select

It loads the info from my userform1 LisBox2.List into Table(1) instead of
the Table I just created in the first part of my macro. How do I tell it to
load ListBox2.List into the new Table and not Table(1)?



"Doug Robbins - Word MVP" wrote:

You need to move the select to the location where you want to insert the
table and then use

Selection.InsertBefore vbCr
Selection.Collapse wdCollapseEnd
ActiveDocument.Tables.Add Range:=Selection.Range, etc.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP


.



Relevant Pages