473,378 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

basic question - cannot get the range name correct when importing Excel worksheet

JC
Hey there,

I am trying to import an excel spreadsheet using the code below. Every
time it gives me a "cannot locate object" error.

Does anyone know what I am doing wrong?

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblTest",
"H:\everyone\Shared\ASC Processes\State Aid Processing
Databases\Lexington Hurns.xls", 0, "Lexington Hurns!Total Cvue Data"
Thank you in advance,

JC

Oct 6 '06 #1
2 1904
Try this

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"tblTest",
"H:\everyone\Shared\ASC Processes\State Aid Processing
Databases\Lexington Hurns.xls", 0, "Total Cvue Data!"
HTH

JC wrote:
Hey there,

I am trying to import an excel spreadsheet using the code below. Every
time it gives me a "cannot locate object" error.

Does anyone know what I am doing wrong?
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"tblTest",
"H:\everyone\Shared\ASC Processes\State Aid Processing
Databases\Lexington Hurns.xls", 0, "Lexington Hurns!Total Cvue Data"
>

Thank you in advance,

JC
Oct 6 '06 #2
JC
Thanks CyberWolf

That did the trick. I knew I was missing something small.

Justin

Cyberwolf wrote:
Try this

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"tblTest",
"H:\everyone\Shared\ASC Processes\State Aid Processing
Databases\Lexington Hurns.xls", 0, "Total Cvue Data!"
HTH

JC wrote:
Hey there,

I am trying to import an excel spreadsheet using the code below. Every
time it gives me a "cannot locate object" error.

Does anyone know what I am doing wrong?
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"tblTest",
"H:\everyone\Shared\ASC Processes\State Aid Processing
Databases\Lexington Hurns.xls", 0, "Lexington Hurns!Total Cvue Data"


Thank you in advance,

JC
Oct 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: deko | last post by:
I use a complied query to export to Excel like this: SELECT * INTO . FROM tblExcelData; But I have a situation where I need to export several tables into the same worksheet. The idea is to...
0
by: acharyaks | last post by:
Hi life saver, I am using excel component for the development. The purpose is to connect to excel through the odbc connection string. Then through the connection extract data into a dataset and...
10
by: Maik | last post by:
Hello, I've got a problem with access to special ranges. I renamed some cells (for example "C4" in "CUSTOM.GENERAL.VPRIM"). This is necessary, because I have to read out only these cells in...
4
by: IMS.Rushikesh | last post by:
Hi All, I am trying to execute below code but it gives me an COMException ///// Code Start //// public string GetName(Excel.Range range) { try { if (range.Name != null)
3
by: Agnes | last post by:
Dim dsExcelExport As New System.Data.DataSet Dim daExcelExport As New System.Data.SqlClient.SqlDataAdapter Dim Excel As New Excel.Application Dim strExcelFile As String Dim strFileName As...
1
by: marknoten | last post by:
I have an excel file with columns A, B, C, D and E that look like this: A B C D E ----------------------------------------------------- N 23,179 15,744...
2
by: bbasberg | last post by:
I have been working hard to clean up my code but I am still wondering why all incoming records go to the "AddNew" part of the IF statement and never to the Edit alternative. I believe that it must be...
3
by: Administrator | last post by:
Hi, My web development server is a Windows 2000 SP4 system. Had created an aspx page with the following code which I had extracted from 1 of the Microsoft websites: Dim oExcel As Object Dim...
10
by: Esmael | last post by:
Hi to all, /*****************************/ OS-WIn XP SP2 VB6 SP6 /*****************************/ Is their anyone who can help me with this: Source code written on VB6.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.