Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vba 打开UserForm,隐藏多页第一页中的一些命令按钮_Vba_Excel - Fatal编程技术网

Vba 打开UserForm,隐藏多页第一页中的一些命令按钮

Vba 打开UserForm,隐藏多页第一页中的一些命令按钮,vba,excel,Vba,Excel,我在excel中有一个命令按钮,可以打开userform Sub openfile () UserForms1.Show End Sub 现在,我如何隐藏表单第一页上的命令按钮,然后在选择下一页时将其取消隐藏?将以下内容放入您的UserForm\u Initialize。。。。 Me.CommandButton1.Visible=False。或者,您可以在“属性”窗口中将按钮的可见值设置为false 然后将其添加到UserForm的代码中 Private Sub MultiPage

我在excel中有一个命令按钮,可以打开userform

Sub openfile ()
  UserForms1.Show
End Sub

现在,我如何隐藏表单第一页上的命令按钮,然后在选择下一页时将其取消隐藏?

将以下内容放入您的UserForm\u Initialize。。。。
Me.CommandButton1.Visible=False
。或者,您可以在“属性”窗口中将按钮的可见值设置为false

然后将其添加到UserForm的代码中

    Private Sub MultiPage1_Change()
 If MultiPage1.Value = 1 Then   'page values start with 0 as the first page
   Me.CommandButton1.Visible = True
Else
    Me.CommandButton1.Visible = False
End If
End Sub

不确定你所说的表格的“第一页”和“下一页”是什么意思。你想完成什么?谢谢。很抱歉反应太晚。