Skip to main content
Solved

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

  • September 16, 2020
  • 6 replies
  • 1353 views

Rajith
Sidekick (Partner)
Forum|alt.badge.img+5
  • Sidekick (Partner)
  • 28 replies

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

Rajith wrote:

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
Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img+6
  • Do Gooder (Partner)
  • 35 replies
  • September 16, 2020

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+5
  • Author
  • Sidekick (Partner)
  • 28 replies
  • September 17, 2020

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)
  • 70 replies
  • Answer
  • September 18, 2020
Rajith wrote:

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+5
  • Author
  • Sidekick (Partner)
  • 28 replies
  • September 19, 2020

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


Rajith
Sidekick (Partner)
Forum|alt.badge.img+5
  • Author
  • Sidekick (Partner)
  • 28 replies
  • September 21, 2020

confirmed it works on 32 :)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings