Solved

Simple Migration Tool.xlsm - Error - Could not unlock memory location. Copy aborted.

  • 16 September 2020
  • 6 replies
  • 1123 views

Userlevel 2
Badge +5

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.

icon

Best answer by pwlm 18 September 2020, 15:57

View original

6 replies

Userlevel 2
Badge +6

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

Userlevel 2
Badge +5

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.

Userlevel 4
Badge +8

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

 

 

Userlevel 4
Badge +11

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

Userlevel 2
Badge +5

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

Userlevel 2
Badge +5

confirmed it works on 32 :)

Reply