VBA常用自定义函数(2) - 检查工作簿是否存在
'检查工作表是否存在
Public Function SheetExist(strSearchFor As String) As Boolean
    Dim InterimSheet As Object
    SheetExist = False
    For Each InterimSheet In ActiveWorkbook.Worksheets
        If InterimSheet.Name = strSearchFor Then
            SheetExist = True
            Exit Function
        End If
    Next InterimSheet
End Function
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号