UserForm不会显示

时间:2016-12-16 13:40:27

标签: vb.net ribbon userform officedev

我正在使用Office开发人员工具并制作了一个功能区来访问某些功能。事实是,看起来我无法从按钮打开用户窗体,其他命令似乎正常运行。 代码:

while ($row = mysql_fetch_array($results1)) {
    echo '<td><input  type="text" value="' . $row["first_name"] . '" ></td>';
}

此代码在excel功能区上显示此结果:

https://s24.postimg.org/6z16l6g43/Print_1.jpg

现在使用此代码:

Public Class Empresa
    Private Sub Button1_Click(sender As Object, e As RibbonControlEventArgs) Handles btn_DBSol.Click
        'Dim wnd As New frm_DBSolventes
        'wnd.Show()
        MsgBox("Hello World")
    End Sub
End Class

没有结果:

“错误列表”窗口中没有错误。 frm_DBSolventes是userform引用项目的用户表单,表单上没有任何内容,只是创建了一个userform的新项目并尝试显示它。有什么我想念的吗?有没有其他方法可以在功能区上使用用户表单?

请求frm_DBSolventes

https://s29.postimg.org/6w6ae15qd/Print_3.jpg

只需添加datagridview,我需要继续工作。如果它有所不同我可以改变它。表格上没有代码:

Public Class Empresa
    Private Sub Button1_Click(sender As Object, e As RibbonControlEventArgs) Handles btn_DBSol.Click
        Dim wnd As New frm_DBSolventes
        wnd.Show()
        'MsgBox("Hello World")
    End Sub
End Class

1 个答案:

答案 0 :(得分:0)

尝试将其显示为模态窗口。

相关问题