Quote:
Originally Posted by macropod
|
Thank you for your reply.
I try your suggest.
I try to use table instead of shape.
But I am really not good at VBA,it still can't work.
I have a Class Module (named "ClassCell")
Code:
Public WithEvents objCell As Word.Application
Private Sub objCell_Click()
MsgBox "Hello"
End Sub
I have a sub in My standard Module:
Code:
Global theCell() As New ClassCell
Global tableNew As Table
Sub toTest()
Set tableNew = ThisDocument.Tables.Add(Selection.Range, 5, 4)
Set theCell(1).objCell = ThisDocument.Tables(1).Cell(2, 1)
End Sub
I ran the sub "toTest",then some message appeared:
『 Type mismatch (
Error 13) 』
Do you have any suggestion?
Thank you!