Go Back   Access World Forums > Microsoft Access Discussion > Macros

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-30-2017, 07:36 AM   #1
markcrobinson
Newly Registered User
 
Join Date: Nov 2017
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
markcrobinson is on a distinguished road
Best use of Macros

I would be interested in a discussion as to when it's best to use a macro vs. VB program.

markcrobinson is offline   Reply With Quote
Old 11-30-2017, 07:45 AM   #2
Minty
AWF VIP
 
Minty's Avatar
 
Join Date: Jul 2013
Location: UK - Wiltshire
Posts: 4,674
Thanks: 97
Thanked 1,276 Times in 1,249 Posts
Minty has a spectacular aura about Minty has a spectacular aura about
Re: Best use of Macros

VBA generally is more flexible and give you direct control over all aspects of the Access interface - macro's cannot do all of this.

I don't think you can loop through a recordset or create arrays in macro's to the best of my knowledge.

Almost every developer on here would use VBA in preference to a macro, that must also tell you something.
__________________
A little thanks goes a long way
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

(Please use the scales on the left if we have helped!) Mark threads as Solved once you have an answer.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Minty is offline   Reply With Quote
The Following User Says Thank You to Minty For This Useful Post:
markcrobinson (11-30-2017)
Old 11-30-2017, 08:07 AM   #3
plog
AWF VIP
 
Join Date: May 2011
Posts: 8,292
Thanks: 10
Thanked 1,993 Times in 1,954 Posts
plog is a jewel in the rough plog is a jewel in the rough plog is a jewel in the rough
Re: Best use of Macros

The only time I use macros is when I use the Task Scheduler in Windows. In it I point to a database along with a command line argument to run a certain Macro. It opens, fires off the macro and then the macro closes everything.

Of course inside the macro it just points to a VBA function that does all the work.

plog is offline   Reply With Quote
Old 11-30-2017, 09:15 AM   #4
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 2,907
Thanks: 52
Thanked 682 Times in 630 Posts
ridders has a spectacular aura about ridders has a spectacular aura about
Re: Best use of Macros

I also never use macros apart from:

a) Autoexec - to run one or more routines at start up before the default form loads
b) Autokeys macro for assigning certain keyboard shortcuts to designated functions (particularly useful during development)
e.g. on 1 app, I use Ctrl+F5 to return to the login form
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
, Tapatalk


If this answer has helped, please click the Thanks button and/or click the 'reputation' scales symbol on the left and leave a comment. Cheers!
ridders is offline   Reply With Quote
Old 12-01-2017, 11:25 AM   #5
RogerCooper
Newly Registered User
 
Join Date: Jul 2014
Posts: 79
Thanks: 0
Thanked 8 Times in 7 Posts
RogerCooper is on a distinguished road
Re: Best use of Macros

Macros are useful when you are basically conducing a series of action queries and printouts. They are also quicker to write.

I have many macros in my active database, some of which are run daily (by a VBA program), others are run as needed.

RogerCooper is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros or no macros? Update or not? EternalMyrtle Theory and practice of database design 4 06-15-2013 05:25 AM
Macros v VBA LorraineM Modules & VBA 4 08-02-2009 11:31 PM
Access macros that run excel macros pltnsgt Macros 1 04-11-2007 05:59 AM
Concerning some macros AmySciv Macros 1 03-25-2004 11:55 AM
Calling Private Macros N number of times in Public Macros. Xl 97. lambuhere1 Modules & VBA 1 12-03-2001 12:51 PM




All times are GMT -8. The time now is 10:01 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World