cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh Transaction in VBA macro EXCEL

Solved
Highlighted
Contributor

Refresh Transaction in VBA macro EXCEL

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

Thanks

Andrea G

1 Reply
MEGA

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

http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqkLAAQ

Manage transaction using API script

http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqSCAAY

 

Note also that in VBA, types must be declare

Ex: Dim oObject as MegaObject

Jerome