Access VBA codes for export into excel

vinwin06

Registered User.
Local time
Today, 07:18
Joined
Sep 1, 2011
Messages
17
Hi All,

I need to export a set of 15 queries into excel for the specified range created in excel file. All these queries belongs to different criteria's and need to go separtely to their specified range. Is there is any way to export into excel using VBA codes in access.
I have some knowledge about docmd transferspreadsheet but its for only one query and its taking more time to export also.
 
Hi thanks for the link, but i am not sure how to run the module once its created .... i have created based on the code provided can you please tell me how i can execute that...
 
In a button's onClick event, you would call it like so...

Code:
Call SendTQ2Excel("Your Table or Query name","Name of the Excel sheet")

The second parameter is optional, so you can provide it, or leave it out entirely. I recommend you do a bit of research on VBA.

edit- If Bob happens across this, I would like to know why it is a function. I don't see it returning anything. I haven't actually looked at this code in a while, and the last time I did, I didn't know much.
 

Users who are viewing this thread

Back
Top Bottom