View Full Version : Run Time Error 7 Out of memory Issues

09-08-2012, 06:54 AM
Hi All,

Some time ago I posted here asking if someone knew of a way to export a range within a worksheet as a .bmp image. Thankfully someone got back to me and the I managed to implement the code on the worksheet and everything has been working fine since.

However my work are now in the process of upgrading both the OS (from XP to Windows 7) and MS Office (from 2003 to 2010), I have been testing the spreadsheet to see if it is affected and everytime I run the code on the newer Windows 7 system I get a 'Run time error 7, out of memory' message and excel just shuts down.

I have attached a copy of the worksheet and the code that I am having the issue with. When I step through the code it seems to hang up on;

'\\ Create the Range Picture Object
OleCreatePictureIndirect uPicinfo, IID_IDispatch, True, IPic

So in Summary;

Spreadsheet created using Windows XP and Excel 2003 = Works fine

Run spreadsheet using Windows 7 and Excel 2010 = Run Time Error 7

Run spreadsheet using Windows 7 and Excel 2003 = Run Time Error 7

Does anyone have any ideas?



09-09-2012, 08:07 PM
Hi Panda,

Your code worked fine for me with Windows 7 (32 Bit ) and Excel 2010. Are you running 64 bit Win 7? If so try changing user32 to user64 in the code as a guess (can't try it as I don't have it :dunno).

09-22-2012, 02:59 AM
Thanks for the reply, (sorry for my late reply have been working away for a couple of weeks so havent managed to get back onto the forum until now) I will give that a go. Looking at the 'System' information which I have accessed via the 'Control Panel' it seems that my company are using the 32 bit operating system. I will give it a try though.

Thanks again for getting back to me

09-29-2012, 07:19 AM
Update: The computers at my work are all running Windows 7 32Bit, and when I change the code to read 'User 64' the code bombs out stating that is can not find 'user 64'

Does anyone have any ideas? : pray2: