Array

D

Dave Neve

Hi

The code below should produce a table if I am to believe the help pages but
it doesn't.

I have the feeling that something has completely escaped me with 'array'.

Thanks in advance

Sub TableManners()
Dim A As Variant
A = Array(10, 20, 30)
End Sub
 
E

Ebbe

Hi Dave
You tries to create a 3 dimentilnal array of variants in VBA.
If I understand you correct You vant to create a table in a document.
It is done by the following cond.

Sub CreateTable()
ActiveDocument.Tables.Add Range:=Selection.Range, _
NumRows:=11, NumColumns :=3, _
DefaultTableBehavior:=wdWord9TableBehavior, _
AutoFitBehavior:= wdAutoFitFixed
End Sub

Hope it answers your question.

Ebbe
 

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