Thank you for your suggestions. The problem with this as pointed out by billPower is multiple sheets. Does anyone have any code for going through the sheets and doing and import??
Just to let you know that I got it working. In case you are interested I used this code to loop through the worksheets
'add loop to move through worksheets
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Dim xlDay As String
Dim i As Integer
Set xlApp = CreateObject("Excel.Application"
Set xlBook = xlApp.Workbooks.Open(strExcel, , , , "Skiing9"
Set xlSheet = xlBook.ActiveSheet
For i = 1 To xlBook.Worksheets.Count
xlBook.Worksheets(i).Select
xlDay = Worksheets(i).Name
Dim tst As String
Set xlSheet = xlBook.Worksheets(i)
DoCmd.TransferSpreadsheet acImport, , strSaveAs & xlDay, strExcel, , xlDay & "!"
Next i
Set xlApp = Nothing
Set xlBook = Nothing
Set xlSheet = Nothing
Thanks BillPower for your input. I had actually used your earlier version of importing from a dialogue box (having stumbled upon it by accident) and made modifications to it. I also did check out your latest version and borrowed a couple of ideas from it as well. Both of these helped me significantly and I appreciate your help on this.
BeachBumTechie...did you get your problem resolved?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.