M
mark_jm
I am using vba code as code assigned to a button on a user form.
The offending code is
Dim mytable As Table
Set mytable = ActiveDocument.Tables(1)
MsgBox (mytable.Cell(1, 1))
id = student(numc, 2) ' where numc is
an integer used to select the sorrect table row
mytable.Columns(1).Cells(1) = id 'Student is an array holding
values read from the form
It falls over highlighting the code ".Cells(1)=" in blue stating error
message " invalid use of property".
The help at that point talks about property let and property get statements ?
I have also tried mytable.Cells(numc,1) and mytable.cells(1, 1) just to try
and get it working with no joy
Please help
The offending code is
Dim mytable As Table
Set mytable = ActiveDocument.Tables(1)
MsgBox (mytable.Cell(1, 1))
id = student(numc, 2) ' where numc is
an integer used to select the sorrect table row
mytable.Columns(1).Cells(1) = id 'Student is an array holding
values read from the form
It falls over highlighting the code ".Cells(1)=" in blue stating error
message " invalid use of property".
The help at that point talks about property let and property get statements ?
I have also tried mytable.Cells(numc,1) and mytable.cells(1, 1) just to try
and get it working with no joy
Please help