Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transferspreadsheet cannot find Excel tab with space between letters?

Status
Not open for further replies.

mssbass

IS-IT--Management
Aug 24, 2001
53
0
0
US
I am trying to import an Excel worksheet; however, if the tab has a space in the word, it won't pull in. If I adjust the tab word, it will pull in:

Private Sub OpenOrders_Click()

DoCmd.TransferSpreadsheet acImport, 8, "UPS COM Test", "D:\Amy\ontime.xls", True, "UPS COM Data!"

End Sub

UPS COM Data - won't pull in
UPSCOM - will pull in
 
You may try enclosing the tab name that has the spaces in them in [] in your docmd statement. I don't know if it will help or not...does sometimes.
 
I created a macro to import Test Sheet, which has a space in it and then had access conver the macro to VBA.

Code:
DoCmd.TransferSpreadsheet acImport, 8, "TEMPA", "F:\COLORCODES.XLS", False, "UPS Com DATA!"

This looks a lot like what you have posted. If you are still having problems could you post the error messages that you get?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top