本文介绍了按代码向MultiPage添加复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 Microsoft告诉我如何在MultiPage中添加复选框 [ ^ ] Dim MyTextBox 作为控制 私有 Sub CommandButton1_Click() 设置 MyTextBox = MultiPage1.Pages ( 0 )。Controls.Add( MSForms _ & 。TextBox.1, MyTextBox,Visible) 结束 Sub 所以我修改了代码 设置 myTextBox = MultiPage1.Pages(zaehler).Controls.Add( MSForms& 。TextBox.1, TextBox& zaehler,Visible) 如果我现在运行makro,它会显示运行时错误:无效的类名 我的错在哪里?我找不到:(解决方案 fyi 我不知道为什么,但是以下代码正在使用MS代码: 设置 myTextBox = MultiPage1.Pages(zaehler)。 Controls.Add( Forms.TextBox.1 , TextBox& zaehler,Visible) Microsoft tells me how I can add a checkbox to a MultiPage[^]Dim MyTextBox As Control Private Sub CommandButton1_Click() Set MyTextBox = MultiPage1.Pages(0).Controls.Add("MSForms" _ & ".TextBox.1", "MyTextBox", Visible) End Sub So I modified the code Set myTextBox = MultiPage1.Pages(zaehler).Controls.Add("MSForms" & ".TextBox.1", "TextBox" & zaehler, Visible)If I run the makro now, it shows me a runtime error: invalid class nameWhere is my fault? I can't find it :( 解决方案 fyiI don't kow why, but the following code is working instead those of MS:Set myTextBox = MultiPage1.Pages(zaehler).Controls.Add("Forms.TextBox.1", "TextBox" & zaehler, Visible) 这篇关于按代码向MultiPage添加复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-15 00:43