The OLE Server Isn't Registered error when using Windows 10 (1 Viewer)

AlanJBS

New member
Local time
Today, 05:16
Joined
Feb 12, 2009
Messages
10
A procedure working for years with XP and Windows 7 now fails with Windows 10, giving the message - "Error 2725: Description: The OLE server isn't registered."

I have a database (Access 2007) which links to an Excel workbook that is running invisibly all the time in the background. The Excel sheet performs some very complicated calculations.

In the database I have a form with a control which is an Unbound Object Frame called 'oleXLData'

Using the VBA code as follows, it visits a designated worksheet, selects the range of a block of cells (denoted in 'B1' as shown below), and copies the displayed data and pastes the picture into the Unbound Object Frame.

me.oleXLData.SetFocus
wsSheet.Range(wsSheet.Range("B1")).CopyPicture
me.oleXLData.Action = acOLEPaste

This now fails with Error 2725
Any help please on how to rectify this problem would be very appreciated. Cheers Alan
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:16
Joined
Oct 29, 2018
Messages
21,358
Hi Alan. Not sure how to help, but maybe you could try using Excel Automation to get the data instead? Just a thought...
 

Micron

AWF VIP
Local time
Today, 08:16
Joined
Oct 20, 2018
Messages
3,476
I have a database (Access 2007) which links to an Excel workbook
by this you mean that you were able to directly modify data in the workbook by editing the 'linked' sheet from within Access? That functionality was removed after a lawsuit but I don't recall if it was present up to Access 2007 or was dropped before that. If that is your issue, there is nothing you can do that you did before. Design changes will be required. As theDBGuy stated, automation may be one way. Linking to the sheets now will allow you to get at the most up to date Excel data, but you will not be able to modify it directly as before.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:16
Joined
May 7, 2009
Messages
19,175
how about substituting

docmd.RunCommand acCmdPaste

to

me.oleXLData.Action = acOLEPaste

after you setfocus on the control.
 

AlanJBS

New member
Local time
Today, 05:16
Joined
Feb 12, 2009
Messages
10
Thanks theDBguy, Micron and arnelgp.

Sorry - the question as I framed it was slightly misleading - the Excel Workbook sheets are not actually 'linked' to the Access database like Access data tables would be. The Excel is just running separately but invisibly in the backgroup and Access just passes data down to it and then reads results back using VBA. All that aspect still works fine - its just trying to paste a block of cells back into Access as a picture is where it's failing. The copying from Excel is working - the image does get onto the clipboard and I can paste it manually into Word for example, but not into Access, not even manually.

Arnelgp - I tried your suggestion but unfortunately it didn't work, but thanks.

If the Error message 'The OLE server isn't registered' is a valid message I think what I really need is to find out how it should be registered, and why was this never an issue in earlier Windows versions?! I see others have had the same issue but seems no answers yet :(

Look forward to any further replies from anyone. Thanks and best wishes Alan
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:16
Joined
Oct 29, 2018
Messages
21,358
Thanks theDBguy, Micron and arnelgp.

Sorry - the question as I framed it was slightly misleading - the Excel Workbook sheets are not actually 'linked' to the Access database like Access data tables would be. The Excel is just running separately but invisibly in the backgroup and Access just passes data down to it and then reads results back using VBA. All that aspect still works fine - its just trying to paste a block of cells back into Access as a picture is where it's failing. The copying from Excel is working - the image does get onto the clipboard and I can paste it manually into Word for example, but not into Access, not even manually.

Arnelgp - I tried your suggestion but unfortunately it didn't work, but thanks.

If the Error message 'The OLE server isn't registered' is a valid message I think what I really need is to find out how it should be registered, and why was this never an issue in earlier Windows versions?! I see others have had the same issue but seems no answers yet :(

Look forward to any further replies from anyone. Thanks and best wishes Alan
"Why" it wasn't registered could be because of many things, but "how" to register it(?), you should be able to regsvr32.exe (I think).
 

AlanJBS

New member
Local time
Today, 05:16
Joined
Feb 12, 2009
Messages
10
"Why" it wasn't registered could be because of many things, but "how" to register it(?), you should be able to regsvr32.exe (I think).

I have seen that mentioned before but I don't know the syntax for how to do it (presumably done in DOS) for OLE server - I'll have a hunt around see if I can find an example. Thanks again!
 

Gasman

Enthusiastic Amateur
Local time
Today, 12:16
Joined
Sep 21, 2011
Messages
14,051
Does this help? Also is your Win10 64bit? as that is mentioned quite often.?

regsvr32

HTH
 

Micron

AWF VIP
Local time
Today, 08:16
Joined
Oct 20, 2018
Messages
3,476
I might try replacing the current control with a new one and see if Windows 10 accepts it if registration doesn't immediately work with the existing control. Your first post suggests this happened after switching the OS. Did the issue arise immediately thereafter or was it good for a time?
 

AlanJBS

New member
Local time
Today, 05:16
Joined
Feb 12, 2009
Messages
10
Does this help? Also is your Win10 64bit? as that is mentioned quite often.?

regsvr32

HTH
Hi Gasman. Thanks for that, I'll investigate - I just need to find out the full exact wording for installing the OLE server. My Windows 10 is 64 bit.

Thanks again!
 

Gasman

Enthusiastic Amateur
Local time
Today, 12:16
Joined
Sep 21, 2011
Messages
14,051
There is not much to it, from what I can see. I have only done it with a few dlls in the past.

Command /options filename

Regsvr32
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:16
Joined
May 7, 2009
Messages
19,175
if your are not saving the unbound object frame to a table, you might consider using an Image control.
I have googled and found many ways to save the image you captured from the range you selected on the worksheet to
a file. you can then set the Picture property of the image control to this file.
 

AlanJBS

New member
Local time
Today, 05:16
Joined
Feb 12, 2009
Messages
10
Thanks for your suggestions ! ......

Micron: - yes, this issue arose immediately after updating to Windows 10. I'll try what you suggest.

Gasman: I have never used Regsvr32 and I wouldn't know what the OCX file name (or equivalent) is for the OLE Server. I'll see if I can find out anywhere - but my first attempts searching online have drawn a blank.

arnelgp: I will try what you suggest too. My only issue is that this is a constantly required feature. To explain...

The Workbook is a highly complex one - not created by me! - and which used to be input manually. It now receives the data from the database about bespoke orders required. There are over 20 types of product and there is a worksheet for each type. It then performs complicated calculations to produce a detailed instruction set (displayed in a block of cells) for the manufacture. My database then uses other information from the database to combine with that retrieved snapshot, which up to now has been stored as an image in an OLE Object database field, to issue instructions to the factory. This is happening constantly thoughout the day. Using the stored Excel image has been a simple and effective.

Once again thanks to all! Alan
 

Gasman

Enthusiastic Amateur
Local time
Today, 12:16
Joined
Sep 21, 2011
Messages
14,051
It might not even be a OCX file.?
This is what I have in 2007 for OLE Automation in References, but admittedly I do not know what the filename or reference would be if not this?
Do you have any win7 machines left to look at?

1586192002205.png
 

Micron

AWF VIP
Local time
Today, 08:16
Joined
Oct 20, 2018
Messages
3,476
Since the object is from an older version of Access, the location of the standard library must be different in Windows 10, or you require a reference to an older version. For example, a Windows 10 install will likely rebuild your registry and that is where the location of library references are kept. You might, for example, require a reference to DAO.3.6 but I would expect that your old projects would show that as being missing. Did you check to see if any were missing or broken?

If you try looking through the Object Browser in your old project, you might discover information that will lead you to the name of the library the object depends on.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:16
Joined
May 7, 2009
Messages
19,175
you need to change your OLE field to an Attachment field.
its very simple process since you already Captured the Image from the
worksheet (.CopyPicture).
all you need to do is Save the image to an image file.
save the FileData to the attachment field.
there are numerous example on the net on how to do this.
 

AlanJBS

New member
Local time
Today, 05:16
Joined
Feb 12, 2009
Messages
10
Hello again all. I am very appreciative of how you are trying to help me.

Gasman and Micron:
1586267893244.png


There are no missing links.
I don't reference DAO.3.6 - instead using the Microsoft Office 12.0 Access database engine Object Library. I've tried DAO.3.6 on the Windows 10 but it still fails.

The stdole2.tlb file is in the Windows folder on both the old Windows 7 machines and the new Windows 10 ones and is referenced in the database references on both. And in the TypeLib sector of the registry of both systems it's there, referenced the same as follows...

HKEY_CLASSES_ROOT\TypeLib\......\2.0\0\win32\C:\SysWOW64\stdole2.tlb and
HKEY_CLASSES_ROOT\TypeLib\......\2.0\0\win64\C:\System32\stdole2.tlb

To my ignorant eye, they look the wrong way round with win32 using the sysWOW64 folder and win64 using the System32, but it works on the Windows 7 machine and I don't know enough about the Registry to mess about with it on the Windows 10.

arnelgp: Thanks for that suggestion and I'll have a play with that.

What bugs me is that Microsoft know that this 'OLE Not Registered' is an issue (it features several times on their sites) but they don't offer a definitive answer.

Thanks as ever - just call me 'Baldy' Alan from now on :)
 

Gasman

Enthusiastic Amateur
Local time
Today, 12:16
Joined
Sep 21, 2011
Messages
14,051
Last edited:

Micron

AWF VIP
Local time
Today, 08:16
Joined
Oct 20, 2018
Messages
3,476
When it comes to advising you how to play with your registry I'm going to abstain, thank you. I will suggest however, that if you have a notion to do something like alter or switch keys you might want to see what you can find out about particular keys first, and that you back up the registry first, and that you know of a way to restart your pc from a boot disk/device in case your modification goes south.
 

AlanJBS

New member
Local time
Today, 05:16
Joined
Feb 12, 2009
Messages
10
Hello all. Thanks for all your help but I'm going to call it a day and try to re-program the database to avoid Ole - possible I'm sure but feels like re-inventing the wheel! Maybe we should switch to Linux!

Thanks again and - Cheers!, Alan
 

Users who are viewing this thread

Top Bottom