Declaring a variable to hold return of tables.add

  • Thread starter Victor Boris Arnold
  • Start date
V

Victor Boris Arnold

I am creating a Word table via VBA and assign the value
returned by the add method to a variable. If I use "Option
Explicit", I must declare that variable. What syntax do I
use to declare a variable whose value is the return value
of a tables.add?
 
J

Jay Freedman

Hi Victor

Dim MyTable As Table

Set MyTable = ActiveDocument.Tables.Add(Selection.Range, 3, 5)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top