我有下面的代码。该形式不初始化。我已经检查和名称,而不是标题,是正确的。
它给我一个错误,说它找不到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
1条答案
按热度按时间v7pvogib1#
我认为您的窗体/模块已损坏。请尝试导出窗体并导入到新文件。