workbook/worksheet related

Sub getworkSheetsFromAnotherWorkbook()
Dim wb As Workbook
Set wb = Workbooks.Open("C:\temp\excel_MBC2_old\BASE_POS-NewCI0005088.xlsx", ReadOnly:=True)
For Each ws In wb.Sheets
Debug.Print ws.Name
Next
wb.Close
End Sub

 
posted @ 2023-05-18 16:24  今天起个早  阅读(13)  评论(0编辑  收藏  举报