首页 /编程语言和算法/VB6/VBA/ASP
 VBA代码 判断表存在
2025年3月18日 10:09
Function ShtExists(shtname)
    '判断Sheet表是否存在
    On Error Resume Next
    Dim s
    Err.Clear
    s = Sheets(shtname & "").name
    
    If Err.Number = 0 Then
        ShtExists = True
    Else
        ShtExists = False
    End If
End Function


 
全部回复(0)
首页 | 电脑版 |