By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,392 Members | 1,516 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,392 IT Pros & Developers. It's quick & easy.

Re: Insert OLE Object Error 2793

P: 1
Colin Leahey
Guest
n/a Posts November 12th, 2005
01:40 PM
#3


Re: Insert Ole Object Error 2793
--------------------------------------------------------------------------------

Having looked at the rest of the code in this module I can see the
problem was me using dodgey coding. The idea was the the user never
sees the ole control and just clicks on a button to insert or veiw
objects. So I hid the ole control on the form and didn't let it have
focus.

Private Sub oleBlob_GotFocus()
cmdActivateOLE.SetFocus
End Sub


This was my mistake, the control must have focus in order display the
Insert object dialog.

If anyone comes across this an a MDSN article please could you attach
it as I couldn't find it anywhere and had to work this out for myself.

Colin.
Colin, thank you for your posts on this subject. It helped me to solve a similar problem I was having. I'm designing a form that will let the user select an Excel file to embed. It appears that setting the focus IS the key to this problem, however, you have to make sure you set the ".enabled" property of the OLE object to True before setting the focus. I don't want my users to edit the source file, so I have the OLE object disabled and locked at all times except for when the user wants to look at a different file.

Thanks again!
Specterman
Oct 5 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.