Showing results for 
Show  only  | Search instead for 
Did you mean: 

Refresh Transaction in VBA macro EXCEL


Refresh Transaction in VBA macro EXCEL

How could I refresh a transaction in a  VBA macro EXCEL?


Andrea G

1 Reply

Re: Refresh Transaction in VBA macro EXCEL

Hello Agiovannetti


Note that you cannot resfresh an active transaction

An active transaction is a transaction that is currenlty open in MEGA (using a physical user or a batch user)

You need to create a new transaction or retrieve an existing and inactive transaction.


In the Excel document, add a macro that performes the following:

  • Creates an instance of the MEGA application
  • Open an environment E1
  • Creates a new transaction T1 with a user U1 for a repository R1 or opens an existing transaction T1 with U1 for R1
  • Once you handle this transaction, it is easy to refresh it
    Ex: MyTransaction.Refresh

See also

API script and Excel

Manage transaction using API script


Note also that in VBA, types must be declare

Ex: Dim oObject as MegaObject