Sub ShowHideTable()
Dim table As ListObject
Dim tblTrngl As Shape
Dim tblName As String
Call Shape_Clicked(tblTrngl)
Let tblName = tblTrngl.Name
tblName = Replace(tblName, "Trngl", "")
Let table.Name = tblName
我已对其进行了调试,tblName
正是我想要的,但当我尝试设置listobject
的名称时,我收到了错误消息。
无论我如何设置它,最后一行都会出错。我做错了什么?
答案 0 :(得分:0)
Set table = ThisWorkbook.ActiveSheet.ListObjects(tblName)