Skip to main content

Hi All,

   We have this unsupported tool (Simple Migration Tool.xlsm) and it works fine except for at one customer. They get the error “Could not unlock memory location. Copy aborted.” when hitting the Export button. Have you seen this error before? How did you solve this?  MS Office installation is 365 ProPlus (same as what I have)

 

the macro code bit is

'Unlock the memory.

  If GlobalUnlock(hGlobalMemory) <> 0 Then

    MsgBox "Could not unlock memory location. Copy aborted."

    GoTo OutOfHere2

  End If

...

 

Many thanks.

Its the VBA code, basically its kinda poorly written and I’ve made a few amendments from time to time… firstly and most easy is the columns and rows… it assumes all columns are full so write a little code which finds the last column and then use this as a reference throughout the code… but its an Excel VBA issue


thanks @richardwoods, any idea about this specific error on few machines only. could it be some kind of a restriction? group policy setting as it works perfectly on all other machines i tried.


This error is related to the change between 32bit and 64bit clipboard handling.

 

 


Hi All,

   We have this unsupported tool (Simple Migration Tool.xlsm) and it works fine except for at one customer. They get the error “Could not unlock memory location. Copy aborted.” when hitting the Export button. Have you seen this error before? How did you solve this?  MS Office installation is 365 ProPlus (same as what I have)

 

the macro code bit is

'Unlock the memory.   If GlobalUnlock(hGlobalMemory) <> 0 Then     MsgBox "Could not unlock memory location. Copy aborted."     GoTo OutOfHere2   End If

...

 

Many thanks.

Hi Rajith ( @Rajith ),

Attached version with fix.

Like @richardwoods I also dabble in VBA :sweat_smile:

Cheers,

Pete


oh cool :relaxed:  Thank you @pwlm I’ve asked them to test with your version.


confirmed it works on 32 :)


Reply