473,487 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

OutputTo

I have written a macro that outputs the result of a query into an excel
worksheet. Works great. What I now need to do is output the results
of a second query into a different worksheet of the same spreadsheet.
Is there any way I can specify the worksheet name in the output
filename?

Any suggestions would be appreciated.

Nov 13 '05 #1
2 1702
ji************@yahoo.com wrote:
I have written a macro that outputs the result of a query into an excel
worksheet. Works great. What I now need to do is output the results
of a second query into a different worksheet of the same spreadsheet.
Is there any way I can specify the worksheet name in the output
filename?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm not positive, but I believe you indicate the worksheet name in the
filename. Something like this:

"Accounts.xls!WorkSheetName!RangeName"

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQtf3woechKqOuFEgEQI6RQCgz2Uqzi1JoC1LuHoH6fbnpT MIQHsAoI12
FUm6bXR6R87Dpdybpsdceti9
=SCR1
-----END PGP SIGNATURE-----
Nov 13 '05 #2
ji************@yahoo.com wrote:
I have written a macro that outputs the result of a query into an excel
worksheet. Works great. What I now need to do is output the results
of a second query into a different worksheet of the same spreadsheet.
Is there any way I can specify the worksheet name in the output
filename?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm not positive, but I believe you indicate the worksheet name in the
filename. Something like this:

"Accounts.xls!WorkSheetName!RangeName"

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQtf3woechKqOuFEgEQI6RQCgz2Uqzi1JoC1LuHoH6fbnpT MIQHsAoI12
FUm6bXR6R87Dpdybpsdceti9
=SCR1
-----END PGP SIGNATURE-----
Nov 13 '05 #3

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

Similar topics

2
6111
by: Randy Harris | last post by:
I'm using OutputTo to send data into Excel. It has been working nicely. Now, I need to add more worksheets using OutputTo. Whenever I use it, it replaces the existing worksheet. Is there any way...
1
2731
by: paul.hanti | last post by:
This board has been a plethora of information. Thanks to all that respond! I have a quick question regarding the built-in OutputTo macro. I've built a shared database in Access 2003 (in Access...
4
3011
by: deko | last post by:
When using OutputTo with a query, the 'File name' window in the 'Output To' dialog gets populated with the name of the query by default. This makes the exported file self-describing if the query...
1
5297
by: Ryan | last post by:
Hello. I was hoping that someone may be able to assist with an issue that I am experiencing. I have created an Access DB which imports an Excel File with a particular layout and field naming. ...
5
4588
by: sara | last post by:
I have reports that run from a form where the user can choose a date range, or they run automatically for a week in the "Weekly Reports" option. I created 2 queries and 2 reports - one query...
5
9305
by: dancole42 | last post by:
I have a question regarding the DoCmd.OutputTo function. I have an invoice report that shows all of the invoices for a particular date. I want to create a button that will export each page of...
1
6247
by: Simon | last post by:
Dear reader, With the DoCmd.OutputTo ...... you have the possibility to write a report to an external location. In case the external location is an existing file the DoCmd is not...
2
8238
by: Jim Devenish | last post by:
I have a report which can be displayed on the screen with: DoCmd.OpenReport "RemittanceAdvice",acViewNormal,,"PaymentID = " & paymentRecID I now wish to create a snapshot of this, using the...
2
1285
by: clarencelai | last post by:
Hi.. I have a question regarding the DoCmd.OutputTo function. I am automating some email scheduling with file attachments generated from OutPutTo function. However, some of the daily...
2
3740
by: jmartmem | last post by:
Greetings, I have several Access 2007 reports that I regularly export to individual PDF flat files on a web server. I've successfuly created a module sub to export the reports using the...
0
7137
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,...
0
7181
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...
1
6846
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...
0
7349
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...
0
5442
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4565
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...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1381
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 ...
0
267
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...

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.