我正在尝试执行本网站www.excel-easy.com上写的内容,但是当我commandbutton按照网站指示单击工作表中的(来自 ActiveX 控件)时,没有任何反应。我尝试使用表单控件中的按钮,但它说错误在此 ---> DinnerPlannerUserForm.Show
我的代码:
Sub Button2_Click()
DinnerPlannerUserForm.Show
End Sub
Run Code Online (Sandbox Code Playgroud)
当我使用 F8 时,它说错误在这里 --> Private Sub UserForm_Initialize()
Private Sub UserForm_Initialize()
'Empty NameTextBox
NameTextBox.Value = ""
'Empty PhoneTextBox
PhoneTextBox.Value = ""
'Empty CityListBox
CityListBox.Clear
'Fill CityListBox
With CityListBox
.AddItem "San Francisco"
.AddItem "Oakland"
.AddItem "Richmond"
End With
'Empty DinnerComboBox
DinnerComboBox.Clear
'Fill DinnerComboBox
With DinnerComboBox
.AddItem "Italian"
.AddItem "Chinese"
.AddItem "Frites and Meat"
End With
'Uncheck DataCheckBoxes
DateCheckBox1.Value = False
DateCheckBox2.Value = False
DateCheckBox3.Value = False
'Set …Run Code Online (Sandbox Code Playgroud)