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

How to create OLE Objects at run time

P: 68
How to create OLE Objects at run time, anyone give me the code solution
May 15 '08 #1
Share this Question
Share on Google+
3 Replies


kadghar
Expert 100+
P: 1,295
How to create OLE Objects at run time, anyone give me the code solution
do you mean creating the Control? (like controls.add("vb...))
or embeding an application to your ole object?
May 15 '08 #2

P: 68
do you mean creating the Control? (like controls.add("vb...))
or embeding an application to your ole object?
OLE as an Object and that can embed any application
May 16 '08 #3

kadghar
Expert 100+
P: 1,295
OLE as an Object and that can embed any application
you can create any object, declare it as a variable, then just embed any of those objects to the Control

e.g.

Expand|Select|Wrap|Line Numbers
  1. dim obj1 as object
  2. dim obj2 as object
  3. set obj1 = createobject ("excel.application")
  4. set obj2 = createobject ("internetexplorer,application")
  5. obj1.visible=true
  6. obj2.visible=true
  7. obj1.open("c:\mybook.xls")
  8. obj2.navigate "http://bytes.com"
since you set both as visible = true, they will appear in a new window, but you can embed any of them to your OLE control in your Form.

HTH
May 16 '08 #4

Post your reply

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