How to ensure that your VISUAL "peeps" are using the current version of a macro

Don't you hate it when you find out that one of your VISUAL users is using an old version of a macro?  Wouldn't it be great if you could modify a macro and it would instantly be deployed across your VISUAL network? 

Well you can...and here's how you can do it.

The solution involves 2 sets of macros. 

The first set of MACROS (let's call them your ACTION macros) are  your main macros that contain the scripts that account for your business logic and rules.  Place these ACTION macros in a centralized location on your network where your VISUAL users have access to. 

The second set of macros (let's call them your SHELL macros) will have the same file name as your ACTION macros but will contain a script that will run it's respective ACTION macro.  These SHELL macros are the ones that should be place on each VISUAL workstation (and/or profile) in their respective VISUAL local directory.  You will only have to configure these SHELL macros once for each workstation.

Once the ACTION & SHELL macros are in place - any modifications you do to the ACTION macros will immediately be deployed in your VISUAL environment because your SHELL macros are pointing to the ACTION macros and executing them.

Say what?!?  How do you get these SHELL macros to run the ACTION macros?

I'll demonstrate with a simple example (much easier to explain)

Let's say you have an OnSave macro in Part Maintenance that checks to see if the user has populated the PRODUCT CODE field. 

Your ACTION macro would contain something similar to the following:

Infor VISUAL ERP - Action Macro

So this ACTION macro would have the filename "VMPRTMNT_OnSave.vms".  You will want to place this ACTION macro file on your network where your VISUAL users have access to.  In this example - let's assume it's stored in location \\SHARED\MACROS

Now let's create it's respective SHELL macro, which will also be an OnSave macro, BUT it will contain the following script to call the ACTION macro.

Infor VISUAL ERP - Shell Macro

Download the SHELL macro script

Place this SHELL macro on each VISUAL workstation (in the local directory).

You're all set. 

Now when you save in PART MAINTENANCE, the SHELL macro will call the ACTION macro to verify whether the PRODUCT CODE has been entered.

With this setup - you don't need to chase down and update workstations if you modify a macro (or have users log out & log back to initial the login script to deploy macro files).

Just modify the ACTION macros - and the update is instant.

I would like to thank Jenifer Barcus, Applications Specialist at Waukesha Foundry Inc., and Jim Herzfeld for allowing me to share this solution on It's awesome! 



TrackBack URL for this entry:

Listed below are links to weblogs that reference How to ensure that your VISUAL "peeps" are using the current version of a macro:


Feed You can follow this conversation by subscribing to the comment feed for this post.

This is great! I do have a question: Am I missing something, or is there no place to grab the actual code of the "Shell Macro" via clipboard?

(I can get it from the image, but that's almost like doing work...)

DING! DING! DING! Another use for the "Execute objFile.ReadAll()" would be to call a "sub file" that had a common set of actions.

For example, all of our OnSave (and many of the other macros), have something like the following at the end of the Macro. Having this in one place, and having it called would make it much easier for any changes (this probably isn't the best example for this). It probably makes more sense for a couple of our business rules that are used in multiple macros and are 50+ lines long.

This would also support only requiring one Action Macro to be maintained for the Order Entry/Order Management Windows and the Purchase Order/Purchase Order Management pair. (the names of the Shell Macros would match the window, but both of these would set the "nFileName" variable to the same file name.

------------>8 Code Sample 8 "" Then
If sMsg = "" Then
sAdvise = sAdvise & vbCrLf & "The Part Information was saved," & vbCrLf
sAdvise = sAdvise & "but some information may have been changed " & vbCrLf
sAdvise = sAdvise & "or needs to be reviewed."
sAdvise = sAdvise & vbCrLf & "Some information may have been changed " & vbCrLf
sAdvise = sAdvise & "or needs to be reviewed."
End If
MsgBox sAdvise, vbOKOnly + vbInformation, "Part Save Advisory"
End If

'sMsg indicates an error, and the save will be stoped
If sMsg <> "" Then
sMsg = sMsg & vbCrLf & "Integrity Check Failed, Part Not Saved!"
'The following stops the save
'Allow the save
End If


The comments to this entry are closed.


Rich Ferlatte
Results Driven VISUAL Specialist


Of course, I am available for hire!

ERP Implementations & Upgrades
Analytics & Reporting
Integrations & Macros
General VISUAL Support


Taking it to the next level and designing a program around "Hands On VISUAL Training".

Check them out - there's sure to be one to interest you!

Operational Workshops
Reporting Workshops
Financial Workshops
Inventory Workshops
Quality Workshops


BOM Xploder
Drastically improve your BOM visibility and discover shortages at ANY level of your bill of material no matter how deep.
See, analyze, and track information that helps you better support individual, departmental, and your company’s performance metrics and goals.
eBoard - Financial Power App
Developed for accounting professionals looking for powerful and easy-to-use GL reporting software. Access live financial data, drill down to support details and export financial statements to Excel in one click.
Inventory App
This Inventory Reconciliation App provides a systematic approach to control and manage your Visual inventory effectively and efficiently
Credit Card Integration
Easily accept and process credit card payments right from within VISUAL.
ACH Document Processing
Leveraging VISUAL's payment scheduling and batch payment functions, with the added convenience, performance, and security of Electronic Funds Transfer payment processing.
Latitude Manifest & Shipping System
A seamless multi-carrier shipping solution that integrates to Infor VISUAL ERP. See how it can simplify your small parcel and LTL shipping and package tracking.
Sales Tax Automation with AvaTax
Easily automate sales and use tax in VISUAL with AvaTax. No more manually entering data or uploading rate tables and tax information.
Workforce Management with Kebrite Solutions
Streamlines the collection of Job, Labor, Payroll, Time & Attendance, and a vast array of HR related data-- with live VISUAL integration.