By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,510 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,510 IT Pros & Developers. It's quick & easy.

OutputTo

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.