I want this Access VBA to show a message box for each worksheet in the excel file. The MsgBox should say the worksheets name. HELP.
Code:
Sub ShowWorkSheets()
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = New Excel.Application
Set xlBook = xlApp.Workbooks.Open("L:\DOC-ADM\Business Analyst\Apr 08, FD SLA 2.xls")
For Each xlSheet In xlBook
MsgBox xlSheet.Name
Next xlSheet
End Sub
Comment