excel VB代码

Sub look()
    Dim xCount%, yCount%, a$, b$
    Dim ws As Worksheet
    Dim wb As Workbook
    Dim mypath$, myname$
    mypath = ThisWorkbook.Path & "\数据源\"
    myname = Dir(mypath & "*.*")
   ' MsgBox myname
    Application.ScreenUpdating = False
    Set wb = Workbooks.Open(mypath & myname)
    xCount = wb.Sheets(1).UsedRange.Rows.Count
    yCount = wb.Sheets
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页