Skip to main content
Solved

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

  • Sep 16, 2020 10:29 AM UTC
  • 6 replies
  • 1551 views

Rajith
Sidekick (Partner)
Forum|alt.badge.img+6

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.

Best answer by pwlm

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

View original

6 replies

Forum|alt.badge.img+6
  • Do Gooder (Partner)
  • Sep 16, 2020 10:38 AM UTC

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


Rajith
Sidekick (Partner)
Forum|alt.badge.img+6
  • Author
  • Sidekick (Partner)
  • Sep 17, 2020 9:38 AM UTC

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.


Mike.Hollifield
Hero (Partner)
Forum|alt.badge.img+8

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

 

 


pwlm
Hero (Partner)
Forum|alt.badge.img+11
  • Hero (Partner)
  • Answer
  • Sep 18, 2020 1:57 PM UTC

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


Rajith
Sidekick (Partner)
Forum|alt.badge.img+6
  • Author
  • Sidekick (Partner)
  • Sep 19, 2020 11:32 AM UTC

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


Rajith
Sidekick (Partner)
Forum|alt.badge.img+6
  • Author
  • Sidekick (Partner)
  • Sep 21, 2020 12:20 PM UTC

confirmed it works on 32 :)