473,811 Members | 2,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TransferSpreads heet acExport fails when xls sheet does not exist

Hi All,
In Access97 I'm using a TransferSpreads heet acExport in vba code and
it errors when the spreadsheet I'm exporting does not exist. If I
create a empty spreadsheet with the name I use in the
TransferSpreads heet statement it works.
I don't understand whats going on here, why won't TransferSpreads heet
create the spreadsheet if did does not exist?
thanks
bobh.
Nov 13 '05 #1
1 2937
Bob,

I no longer have Access 97 on my system.

However, I assume you've checked the "TransferSpread Sheet Action"
topic in the Access 97 VBA help system. If it's the same as in Access
2000, then it'll say that the "TransferSpread Sheet Method" will create
the Excel file if it doesn't exist. (You might also double-check the
Microsoft knowledgebase online.)

My guess is that the method should create the file, but there is
something else preventing the file's creation.

So, what else could prevent the file's creation? Is it a file system
issue?

If this continues to be a problem you can't resolve and you need a
quick solution, perhaps use the DoCmd.OutputTo method.

Regards
Geoff

Nov 13 '05 #2

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

Similar topics

1
7288
by: Nathan Bloom | last post by:
Hi, I have a procedure that transfer data from an Excel spreadsheet to an Access 2000 table. There is a start date and an end date in the range specified. One of the date fields transfers correctly and the other one transfers as a text field containing a number like 37917. In the spreadsheet both date cells are formatted as a date. The data in both fields are entered as dates (i.e. 10/27/03). The TransferSpreadsheet Command creates...
1
4230
by: O'Donnell Tribunal | last post by:
Hello Everybody, I am using the TransferSpreadsheet method to import spreadsheets for processing. say my code looks like this: DoCmd.TransferSpreadsheet acImport, 0, _ "tbltempImport1", "" & strFileExtn, False, "Spreadheet1!A1:D30"
3
11076
by: user_5701 | last post by:
Hello, I'm getting an error with a Docmd.Transferspreadsheet line of code: DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2000, "tblTest", pathAndFilename, True The above line works perfectly fine, but when I change the table name argument (tblTest) to the name of a query, it fails and gives the following error:
2
16842
by: Hank | last post by:
Hello, I use TransferSpreadsheet on a daily basis using a Table as a datasource. I was under the impression from reading Help that you could also use a Query as the datasource. This is my code: (simplified here) strSQL = "SELECT FROM ;" DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, strSQL, Path, True
1
3994
by: Brad | last post by:
Thanks for taking the time to read my question. I want to use SQL in the TransferSpreadsheet Method, but I can't get it to work. I don't know why, because I've done a debug.pring on the same code to see what the code resolves to and it looks just like the select statement in the query I based it on. I want SQL in there so that it can be dynamic. Any table, and any date
0
1851
by: robert.waters | last post by:
Hello, When executing DoCmd.TransferSpreadsheet to an .xls file that's being used as a datasource for a Word mail merge document, if that Word document is currently open, the TransferSpreadsheet action fails with an 'Error 0'. I have tried different methods of trapping that error, and I still cannot get my app to indicate that the user should exit Word: I have tried disabling the error handler before DoCmd is called, looking for an Err...
3
4541
by: sranilp | last post by:
Hey All, Actually I need to export the data from Access to Excel particular spreadsheet(ie.Raw Data),so I was using Docmd.Transferspreadsheet but in this syntax where i can give the spreadsheet name. Example: I have a Excelfile name is Inventory.xls,and sheet name is 'Raw Data',so i need Access data should export to Inventory Excel file Raw Data sheet. I tried like this:'DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,...
3
4560
by: sophistiKate | last post by:
I have one user who has spontaneously begun getting the run-time error 3435, "Cannot delete spreadsheet cells" in Access 2002. (The is an Access error and not an Excel error, as evidenced by the title of the error window, "Microsoft Access".) I cannot re-create this error on any other machine. Of course, the user can't remember anything unusual occurring on his machine prior to this error showing up. The debugger shows that the error is...
2
3069
by: RZ15 | last post by:
Hi, I am trying to use the transferspreadsheet command to transfer a table into an excel file i have. I'm using the following code: Private Sub cmdOK_Click() 'Run Make-Table query without warnings so I can export the updated table later DoCmd.SetWarnings False DoCmd.OpenQuery "qryPriLis", acViewNormal DoCmd.Close acTable, "Perpetual"
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10393
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10124
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4334
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.