TransferSpreadsheet problem

I am using the command DoCmd.TransferSpreadsheet to transfer data from
a named range in Excel to an Access table. This works ok for importing
from one Excel file but not from another which gives the following
error message:
"The Microsoft Jet Engine could not find the object "NamedRange". Make
sure the object exists and that you spell its name and path

I have searched the news groups to understand what may cause the
problem. The explanations are:
1. The range name is too long - I have tested and this is not the case
2. The file is corrupted - I doubt this is the case.

For both Excel files TransferSpreadsheet works when the file is
already open. The Excel file that doesn't work has a number of
different characteristics from the working file:
1. It has macros
2. It has protection
3. The named range is grouped
4. There are a number of other worksheets
I've tried eliminating these to solve the problem and am struggling to
understand which causes
the issue.

I see two alternative approaches:
1. Open the file using CreateObject("Excel.Application"). Then
transfer the data using TransferSpreadsheet. Even when correctly
deleting the object this causes an instance of Excel to remain after
each file is opened.
2. Open the file using CreateObject("Excel.Application") and transfer
the data from the named range into a recordset.

I'm in the middle of trying to get option 2 to work (with a few
problems); however, for simplicity I would prefer to use

Can anyone shed any light onto what's causing the problem?



10/22/2007 11:11:13 PM
access 16762 articles. 3 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 43


Similar Artilces:

Problems with a one to many form
This is going to sound stupid, but anyway. I have a main form with two sub forms. One of them works perfectly as a one to many sub form, but the other is actually sourced from the main table. I'm trying to redesign the system so that this form actually links off another table, and I can't simply start over because there is already data in the required fields. I've set up the second form in an idenical manner to the first, but no matter what I do, the form simply will not display in a one to many fashion. At best it displays everything in the table, regardless of which main record I...

Problem in converting double to String useing fprintf()
Dearl all, I found a problem in converting a double number to string by using fprintf. Please see the following code: double myDouble = 393.525; char mystringDouble[100]; fprintf( mystringDouble, "%.2f", myDouble ); // After this line mystringDouble will be "393.52" myDouble = 394.525; fprintf( mystringDouble, "%.2f", myDouble ); // After this line mystringDouble will be "394.53" I wonder why the 2nd part of my code can rounding myDouble correctly, while the 1st part fail? Any method can round double correctly in MFC? Marco Any of the printf func...

Outlook 2007 cached mode problem
Hi I do some support for a small company that has just installed their first seat of office 2007. They are running SBS 2000. When Outlook 2007 is set in cached mode no emails after February 7th show for the user and no new emails appear. If cached mode in turned off all their emails show. They were running Outlook 2002 on another machine previously which doesn't have cached mode so without trying it on 2003 I can't tell if it is a server or client problem. All other folders appear to be OK. Any suggestions? Has anyone else had this problem? I support this site remotely so exh...

Office Update 12.0.1 Install Problem
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: intel After successfully re-installing Office, I tried to install the 12.0.1 update and get the message "version required to install this update not found on this volume." Thanks for any help out there. On 3/25/08 7:09 30AM, in article ee95fb7.-1@webcrossing.caR9absDaxw, "" <> wrote: > After successfully re-installing Office, I tried to install the 12.0.1 update > and get the message "version required to install this update not found...

Problems with MDI Application
I have this MDI app. Every child window draws some data (looks like a windows task manager). Everything seems to work just fine but if I let this app running from one day to another, main menu doesn't work as well as context menues, and every dialog I try to invoke (using DoModal) seems to fail too. Processor is not busy and when I push a tool bar button seems to attend right away (The break point shows that any dialog fails as well as LoadMenu calls). GUI is responding well and redrawing correctly. Another important issue : I get and invalid hWnd (0xfefefe..) after a call to Create over ...

Syncronization Problems Using High Speed Internet
I can sync all Outlook 2000 folders with my corporate Microsoft Exchange Server when using a dial-up connection thru my VPN. However, when I switch to my cable modem thru my VPN and syncronize Outlook to the Microsoft Exchange Server, I can not get anything in my Outbox to transport to the server. The syncronization process hangs up on sending. I have to close outlook and go back to the dial- up to complete the syncronization. Why the differences and what do I need to change to make the syncronization work while using a high speed internet connection. Thanks, Tim ...

outlook problem #2
I have win2000 os with sp6. I can't send an email...get error message 'outlook.exe has generated an error' interesting as there is no sp6 for windows 2000. (sp4 was just released a few weeks ago) does outlook start in safe mode? (start | run | type: outlook.exe /safe | ok button) "Butch" <> wrote in message news:0d1a01c34d23$343a83b0$a101280a@phx.gbl... > I have win2000 os with sp6. I can't send an email...get > error message 'outlook.exe has generated an error' ...

Help Please
I am using a vlookup to grab some data from a master list. My vlookup works fine but here is the dilemma: I am using a sheet that has retail items down the rows and divisions where certain items are authorized. Each item has various information including UPC numbers, which I am using for my vlookup. The dilemma/problem/@#!$%%$#@ is that in several instances there may be two or three lines of the item listed. What I get is say three rows with the same UPC but different points of distribution. Obviously the vlookup will only find the first instance of the UPC and give me back the values in tha...

Vlookup problem #5
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C505EF.9D66A680 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have two worksheets with some matching data. I'm trying to use the = following formula to determine if the values in column A on WS1 exist in = Column A on WS2. =3DIF(VLOOKUP(A2,'Equipment Data'!$A$2:'Equipment = Data'!$B$9000,1),"T","F") I am getting #N/A and #VALUE responses.=20 What have I done wrong? Thanks Jim Berglund ------=_NextPart_000_0006_01C505EF....

Outlook connection problem "no transport provider"
Upon trying to shift to a second PC, everything looked fine until I received the following back when trying to send or reply to emails: "No transport provider was available for delivery to this recipient." Its a prodigy dailup account and I am receiving emails just fine. Its Outlook 97 running on an XP machine. Any help would be greatly appreciated. R, Rich ...

Windows XP Update problem help needed-
Am running Operating System : Microsoft Windows XP Home Edition Version : 5.01.2600 Service Pack 3 Problem is that when I go to the Windows update site it shows the following updates available: Microsoft .NET Framework 3.5 SP1 Update for Windows Server 2003 and Windows XP x86 (KB982168) Microsoft .NET Framework 3.5 SP1 and .NET Framework 2.0 SP2 Security Update for Windows 2000, Windows Server 2003, and Windows XP x86 (KB979909) I tryed to install them along with others updates listed and it showed they succeeded along with the others but when I rest...

MS Outlook 2000 Problems
When I click on the MS Outlook link/icon, MS Outlook appears in a small window in the middle of the screen. It then remains in the small window and does not subsequently open up into a large window. I have waited up to ten minutes for anything to happen, but it doesn't. I eventually have to kill it through the Task Menu. The problem started just after I had installed a new Kyocers printer alhtough I cannot see what relivence this night have. Anybody got any ideas? Cheers Peter Close Outlook. Find and rename outcmd.dat to .old. (If using Windows 2000 or XP, you will need to ...

Tab Control query problem
I have a tab control on a form with two tabs. The first tab has drop downs for the month/year and other criteria. It also has a button to run a query based on all of the criteria displayed on the form. The second tab also has drop downs for the month/year and different criteria. It also has a button to run a query based on all of the criteria displayed on the form. My problem is that when I am on the second tab, it picks up the month/year field from the first tab in the query results. I does pick up all of the 'other criteria' from the second tab. How do I correct this? ...

Problems copying from Flash Drive to Hard Drive
I have an 8GB flash drive that holds alot of data but when copying the files onto my desk top's hard drive, I find that copying goes OK for a while until I get an error message along the lines of " .... cannot copy file xxxx becasue the file name or directory name is too long ...". The files on the flash drive are 'nested' but do not have that many levels and the files that are apparently causing problems have only short names. The flash drive is a FAT32 format and the hard drive is NTFS format. I'm not sure if this makes any difference. Any help...

Problems with tab navigation with VC7 (MFC)
On CFormView you can create dialog windows with the style DS_CONTROL | WS_CHILDWINDOW. When using WS_EX_CONTROLPARENT in CFormView, you can tab through all controls of CFormView as well as all controls of the dialog. If you place an ActiveX-Control on CFormView, tabbing doesn't set focus to the controls in the dialog, when compiling with VC7. Compiling with VC6, everything is fine. man be vc7 add some attibutes to control this in the attibute bar. Man On hill "Peter Andersen" <> д���ʼ� news:22F...

Integration Manager (v9) and Price Level SOP import problems
"Customer6" has default price level = "A". "Item6" has default price level = "STANDARD" and has some additional price levels defined, but not one called "A". When I manually create and SOP Order for the "Customer6" and enter "Item6", I get a warning box "the default price level has been used for this item ..." and I click OK. The item in the order does has the price level set as "STANDARD" and that is OK. If I try to import this order using Integration Manager, it will cause the whole order to fail...

Office Genuine Advantage Notifier update failed
XP Pro SP2 - KB949810 update failed, multiple times. Went to the MS suggested fix page and noted they wanted me to go in and fool around with the registry. Well, I don't do 'registry'. So, can I just block this update from being listed and go about my updates and other business with no future problems, OR, is this thing going to jump up and bite me in the rear at some point in time? If it's going to cause a future problem, is there a simpler fix than the convoluted registry tweaks suggested by MS? Why isn't SP3 installed yet? See http://www.mydigitallife...

I have an ActiveX control that uses MFC. In this control I have a simple event (added using the VC++ 6 ClassWizard). In the .odl file: [id(3)] void MouseMove(OLE_XPOS_PIXELS X, OLE_YPOS_PIXELS Y, long Record); From the event map in the ActiveX header: void FireMouseOver(OLE_XPOS_PIXELS X, OLE_YPOS_PIXELS Y, long Record) {FireEvent(eventidMouseMove,EVENT_PARAM(VTS_XPOS_PIXELS VTS_YPOS_PIXELS VTS_I4), X, Y, Record);} When used in a VB6 application, this event causes a division by zero error and a overflow error, even though the values are ok, the event is being called with zeros for x,...

Problem editing a salary deposit
Occassionally I have to slightly amend my paycheck deposit due to rounding on taxes. When I attempt to do so and edit the splits, when I try to enter the transaction to the register, I receive an error that making that change will cause the value of one of my investments included in the split to fall below zero. This makes no sense because I am not changing my investment and I cannot enter the paycheck with all the functionality I want (i.e., taxes, investments, etc.). Any ideas? I think it is a software glitch but there is no way for me to contact MS without paying, which I don'...

Outlook Printing problem
I have a template created in the tasks and I filled out the information and the P2 is not printing as I see it. It keeps coming up as a list which is not in order ir in a formate that I want, How do I change this so it prints like what I see on the screen? ...

Problems invoking an ActiveX object from a dll callback function
Hi all !! I have created an ActiveX component using Visual Basic 6.0 (ctlLedbutton). It is a special button. Then I have created the MFC dialog based application which is using this ActiveX component in VC++. The compiler has created the wrapper class for this button (CctlLedbutton). The buttons are placed in the main dialog window. The application is using this ActiveX objects with no problems (changing aspect and other things) Then I have created a Dll library which is also being used by the main program. This dll class (CMyDllClass) has a pointer to the main dialog class (CMyDlg) that h...

Problem saving embedded .gif or .jpg (.bmp only option)
(Sorry for crosspost (& repost - first had error)- also posted in "microsoft.public.outlook.general") I've seen this question posted a half dozen times, and I've yet to see a solution. Problem: When an animated .gif (ditto for .jpg) is embedded in the body of a message (Outlook 2002 (Windows XP (home) with Office XP 2002) - I'm NOT using Outlook Express), the ONLY option I have for saving the embedded .gif (or .jpg) is in .bmp format - no other option is available. (See attached screen print for clarification.) I have deleted all Temp Internet Folders & files;...

Font problems in Office 2004 Mac OSX 10.3.9
Hello. I have a problem with my font menus in both Word and Excel 2004, MacOSX 10.3.9. When I try to select or change a font the list displayed is a mess. The font names display layered over each other and thus it is unreadable. I use Fontbook to turn fonts on and off. I can turn off all the fonts in Fontbook, restart, but still have the problem. Any suggestions? Many thanks, Kipple On 3/30/07 11:45 AM, in article, "" <> wrote: > Hello. I have a problem with my font menus in both Word and Exc...

problem in excel 97 (running in windows-xp)
hello, I have a problem in excel 97 running under windows-xp. The display of the cell "spills" over to the next cell, even though there is enough space in the cell. The same file running in excel 97 under windows 97 does not show the problem. Does anyone know that to do? ...

problem sorting data, says "this operatioin requires merged cells to be identically sized"
Need help with problem sorting data Error message says "this operatioin requires merged cells to be identically sized" After identically resizing the merged cells (which were in the header row), I still get this error message. If the merged cells are only in the header, select your range (avoid the header) and tell excel that your selection doesn't include headers (at the bottom of that dialog). parman wrote: > > Need help with problem sorting data > > Error message says "this operatioin requires merged cells to be > identically sized" > > A...