Calling Action from Custom Macro

Getting Started #

The most common use of this feature is when you have an Excel macro that copies raw data from a third-party file into the TAD worksheets. After copying the data, you can call actions like Format Table, Validate Import, Execute Import, etc., through the macro, saving you from manually clicking the buttons.

The only requirement is that the Table or Report record must already exist on the TAD worksheet.

How to Call a TAD Action #

In order to call a TAD Action from an Excel macro, use the following code:

Application.Run "RunTADAction", CalledAction, TabName, ClearVariables, PromptAction, SkipProgress, SkipParameters, ParameterString, NewTabNameInput

You will need to replace each of the variables below with your values. If the variable is not required, the default value will be used.

  • CalledAction
    • Description: The TAD Action you want to process (e.g., Format, Validate Import, Execute Import).
    • Type: String
    • Required: Yes
    • Default Value: N/A
  • TabName
    • Description: The tab to process the action against.
    • Type: String
    • Required: Yes
    • Default Value: N/A
  • ClearVariables
    • Description: Clears all VBA variables once the process is completed if True.
    • Type: Boolean
    • Required: No
    • Default Value: True
  • PromptAction
    • Description: Prompts the user to confirm the action if True.
    • Type: Boolean
    • Required: No
    • Default Value: True
  • SkipProgress
    • Description: Skips the TAD Progress form if True.
    • Type: Boolean
    • Required: No
    • Default Value: False
  • SkipParameters
    • Description: Skips the TAD Parameters form if True.
    • Type: Boolean
    • Required: No
    • Default Value: False
  • ParameterString
    • Description: Overrides any saved parameters for the tab. Must include all parameters in a pipe-delimited string.
    • Type: String
    • Required: No
    • Default Value: N/A
  • NewTabNameInput
    • Description: Used to change the worksheet name.
    • Type: String
    • Required: No
    • Default Value: N/A

Example of Stacking Actions

You can stack multiple actions to turn your custom macro into a one-click button to get data into Vista. Here’s an example for moving credit card data into the AP Transaction Entry Tables:

Application.Run "RunTADAction", *Format*, "AP Entry Header", True, False, True, True, "", ""
Application.Run "RunTADAction", *Format*, "AP Entry Lines", True, False, True, True, "", ""
Application.Run "RunTADAction", *Get Batch #*, "AP Entry Header", True, False, True, True, "", ""
Application.Run "RunTADAction", *Execute Import*, "AP Entry Header", True, False, True, True, "", ""
Application.Run "RunTADAction", *Execute Import*, "AP Entry Lines", True, False, True, True, "", ""

These actions will:

  1. Format both the AP Entry Header and AP Entry Lines tabs.
  2. Get the Batch # for the AP Entry Header.
  3. Execute the Import for both the AP Entry Header and AP Entry Lines.

This approach automates the entire process, saving time and reducing errors by eliminating the need for manual button clicks.

Custom Macro Inquiries #

If you have 3rd party data files that you want to import directly into Vista using TAD, inquire about having a custom macro written for that process. Below are a few examples of previous projects:

  • Copied AMEX data into AP Transaction Entry
  • Copied Aatrix data into AP Transaction Entry
  • Copied Job data into JC Cost Adjustments and AR Cash Receipts
  • Copied Timecard data into PR Timecard Entry
  • Copied Job Phase data into JC Job Phases and updated the custom field on JC Jobs

Example: Copying Invoice Data to AP Transaction Entry

In this example, we demonstrate the process for copying invoice data to the AP Transaction Entry.

  • The Data worksheet contains the weekly invoice data.
  • The user clicks the Move Data button, which copies the data into the APHB and APLB worksheets for further processing.

This streamlined process helps automate data entry, saving time and reducing the potential for errors.

The APHB worksheet contains the invoice header information, which is used to process the overall details of the invoice, such as vendor, invoice number, and date.

The APLB worksheet contains the invoice line information, detailing the coding to the GL Accounts for each individual line item on the invoice.

The Dedn xRef worksheet is a download of PR Deductions/Liabilities, used to retrieve the Invoice Description, Vendor #, and GL Account associated with each deduction or liability entry.

The Last Check Used worksheet is downloaded during the process and then applied against the Invoice Header records as prepaid check numbers, ensuring the proper assignment of check numbers for prepaid invoices.

If you have unformatted data that you want to import using TAD, contact us today to get a quote and discuss how we can streamline the process for you!