'如果存在返回True,反之返回False'wb为工作薄 对象
Public Function IsExistWorkSheet(strWorkSheetName as String,wb as object) as Boolean
On Error Resume Next
If wb.Sheets(strWorkSheetName) Is Nothing Then
IsExistWorkSheet=False ' MsgBox "工作表不存在"
Else
IsExistWorkSheet=True ' MsgBox "工作表存在"
End If
EndFunction