Hey guys,
I read somewhere that you can take control of an application tha is open with vba. For example, say I have IE open, and in my database, it calls for me to go to google. well, rather than have the user click a button to open a whole new instance of IE, I could just have my db go to google in the original instance of IE. Any ideas on how to handle this?
Edit: Found it in Help. Highlighted CreateObject and hit F1 and at the very bottom, it says this:
So GetObject is what I was looking for!
I read somewhere that you can take control of an application tha is open with vba. For example, say I have IE open, and in my database, it calls for me to go to google. well, rather than have the user click a button to open a whole new instance of IE, I could just have my db go to google in the original instance of IE. Any ideas on how to handle this?
Edit: Found it in Help. Highlighted CreateObject and hit F1 and at the very bottom, it says this:
CreateObject Function@import url(office.css);Note Use CreateObject when there is no current instance of the object. If an instance of the object is already running, a new instance is started, and an object of the specified type is created. To use the current instance, or to start the application and have it load a file, use the GetObject function.
If an object has registered itself as a single-instance object, only one instance of the object is created, no matter how many times CreateObject is executed
So GetObject is what I was looking for!
Last edited: