我是VBA新手,我有以下代码:
Private Sub CommandButton3_Click()
CommandButton2.Enabled = False
Dim x As Integer
For x = 1 To 14
Me.Controls("textbox" & x).Value = ""
Next x
Application.DoEvents
'Probleeeeeeeeem
Me.Label8.Text = ""
Me.Label9.Text = ""
Me.Label10.Text = ""
Me.Label11.Text = ""
Me.Label12.Text = ""
Me.Label13.Text = ""
End Sub
标签文本(从8到13)已经有一些由另一段代码生成的值。如何将这些值更改为CommandButton3_Click()
的空字符串?
我尝试了Application.DoEvents
和Me.Refresh
但是徒劳无功,这是我收到的错误消息:
谢谢