模块/类模块
【通用函数】Access判断Excel指定工作表是否存在
2017-06-08 17:45:18

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