excel 为什么用户窗体不加载?

ymdaylpp  于 2023-03-04  发布在  其他
关注(0)|答案(1)|浏览(182)

我有下面的代码。该形式不初始化。我已经检查和名称,而不是标题,是正确的。
它给我一个错误,说它找不到formSelectSheet.Show上的指定对象。

Option Explicit
Public sheetsToHideSize As Integer
Public sheetsToHide() As String

Sub HideSelectedSheets()
    Dim ws As Worksheet
    'stores all worksheet names in an array
    For Each ws In ActiveWorkbook.Worksheets
        sheetsToHideSize = sheetsToHideSize + 1
        ReDim Preserve sheetsToHide(sheetsToHideSize)
        sheetsToHide(sheetsToHideSize) = ws.Name
    Next ws
    
    formSelectSheet.Show
    
End Sub
v7pvogib

v7pvogib1#

我认为您的窗体/模块已损坏。请尝试导出窗体并导入到新文件。

相关问题