我是 Visual Basic 的新手,我不明白我需要什么对象来完成这项任务。
我有 5 个“控制文本框”要隐藏在 Powerpoint 中显示。我有以下代码并收到 424 错误:
Private Sub CommandButton1_Click()
Activesheet.oleobjects("TextBox2").Visible = False
Activesheet.oleobjects("TextBox9").Visible = False
Activesheet.oleobjects("TextBox8").Visible = False
Activesheet.oleobjects("TextBox7").Visible = False
Activesheet.oleobjects("TextBox6").Visible = False
End Sub
Private Sub CommandButton2_Click()
Activesheet.oleobjects("TextBox2").Visible = True
Activesheet.oleobjects("TextBox9").Visible = True
Activesheet.oleobjects("TextBox8").Visible = True
Activesheet.oleobjects("TextBox7").Visible = True
Activesheet.oleobjects("TextBox6").Visible = True
End Sub