‎14-11-2019 03:59 AM
Hi,
I'm trying to create a macro to import data to Mega repository, but I have this error message when launch it :
Error message
################################
Compile error:
Method or data member not found
################################
My code:
#######################################################
' connect to MEGA
sAdmUser = "Gear"
sAdmPwd = ""
sUser = "Gear"
sPwd = ""
sEnvPath = "D:\Program Files (x86)\MEGA\MEGA HOPEX V1R3\GEAR_DEV"
sRepository = "Gear_dev"
Set oMegaApp = CreateObject("Mega.Application")
Set oEnvironment = oMegaApp.Environments.Item(sEnvPath) ===>> this is what's highlighted
oEnvironment.CurrentAdministrator = sAdmUser
oEnvironment.CurrentPassword = sAdmPwd
Set lTransactions = oEnvironment.Transactions
Set oTransaction = lTransactions.Create(sRepository, sUser)
oTransaction.Password = ""
Set myRoot = oTransaction.Database.Open
###################################################
Can you please hep?
Thank you
Mehdi
Solved! Go to Solution.
‎19-11-2019 12:21 AM
‎14-11-2019 11:55 PM
Hi Olivier,
The env path is the same as in Megasite.ini.
Is there a different way to connect to Mega repository with R/W access ?
Thank you
Mehdi
‎14-11-2019 08:52 AM
Hello,
there is no obvious error in this code.