Tag:
FSO
| 记录数: 1
-
- Excel中VBA使用的一些总结
- 2012-06-27
最近用VBA写了不少工作 上用的工具,一些常用或是容易出错的拿出来分享一下
1、检查一个XLS里是否存在指定SHEET页
Function SheetExists(ByVal wb As Workbook, ByVal SheetName As String) As Boolean ' returns TRUE if the sheet exists in the active workbook SheetExists = False On Error GoTo NoSuchSheet If Len(wb.Sheets(SheetName).Name) > 0 Then SheetExists = True Exit Function End If NoSuchSheet: SheetExists = False End Function- Views(7250) | Comments(0) | In System/Application Work+Study
