TransferSpreadsheet...Excel Tab Name too long

uscarioca

New member
Local time
Today, 11:10
Joined
Nov 2, 2007
Messages
1
Well this is my first post on this site.....
I am atttemptig to use the TransferSpreadsheet action in an Access Macro...I have got it to work they way I want it to except for one particular Tab I am trying to import from. I beleive the Tab name from the Excel document is too long and I get the following message, "The Microsoft Jet Engine could not find the object,". If I change the name of the Tab simply to "Test" for instance it works fine.

Question, is there a way I can refer to the Tab other than by the actual Tab Description? For instance TAB1, TAB2? I am trying to avoid manually changing the name of this tab, I realize than can probably be done via code however I am not a VBA programmer, simply trying to use the Access Macro editor interface.

Thanks for any help in advance!
Chris
 
By Tab im geussing you are refering to WorkSheet names in Excel. Thus this is how to do it in VBA, a Macro should be pretty much the same.

DoCmd.TransferSpreadsheet acImport, , "Table name", ReturnResult, True, "TAB NAME"
 

Users who are viewing this thread

Back
Top Bottom