Access VB or Macro for AutoExport?

cdahl

New Member
Joined
Nov 14, 2003
Messages
14
Hey Everyone-

Need a little help. I have done alot of Vb in Excel and have used Access quite a bit but have never written any Macros or VB in Access. Im not sure where to start but here is what I want. If anyone can let me know if this process is better served by a Macro or VB code in Access I would really appreciate it.

I have two queries that I want to AutoExport to Excel on the 10 and 25th of every month. I want to set up a Macro or VB which will run these exports automatically on those dates and save them to a specific folder out on the network. I noticed that Access has some features for this but not sure if VB would be better suited. Any help would be Great!

Thanks Chad
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi

I think that you are best to use VB to do this. VB in Access is much closer to Excel than using macros and you will find a lot of overlap. VB also has the advantage of letting you trap errors that would otherwise cause you problems.

You can use the TransferSpreadsheet Method to send data to Excel.
There is a Timer Event on forms that you can use to control when code runs.
If you don't want to leave the DB open all of the time you can use some sort of task scheduler to launch your DB and have a form open automatically to run your code in it.

Peter
 
Upvote 0

Forum statistics

Threads
1,214,822
Messages
6,121,765
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top