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)
 
Top