View Single Post
 
Old 06-28-2020, 05:40 AM
ydmq ydmq is offline Windows 10 Office 2013
Novice
 
Join Date: Jun 2020
Posts: 6
ydmq is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Your attachment suggests you should be using a Word table rather than pictures. See, for example: https://www.msofficeforums.com/word-...html#post47254
In any event, you can also put the shapes into a table so they're positioned as per your layout.
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!
Reply With Quote