What's the best way to find an appname for VBA?

gadavi1

New Member
Joined
Jun 5, 2011
Messages
1
First time poster, and relative newbie to VBA. I want to follow the forum rules, so let me know if I do something out-of-line and I'll try not to do it in the future.

The other day, I figured out how to automate another program from EXCEL using the following line of code:

Set sys = Create.object("Accmgr.System")

But I was only able to figure this out by sheer luck. Somebody who uses the same program posted a VBA question online, and I was able to figure out that "Accmgr.system" was the appname that I wanted to use to automate this particular program.

There are other programs that I would like to automate with VBA in EXCEL, but I don't know their appnames. What's the easiest way to figure out the appname of a program? Is there perhaps a list that I can look up in the object browser?

Thanks!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
That would be interesting to know.

By perusing code posted here, I know that

Code:
Set db = CreateObject("Access.Application")
enables Access and
Code:
Set outapp = CreateObject("Outlook.Application")
enable email via VBA
 
Upvote 0
Probably you could use the object browser (F2 in the Visual Basic Editor). For instance, you'll find you have a library called Excel and it has an object called Application ... ergo, CreateObject("Excel.Application"). You can browse the references (Tools | References) to set references to more objects (but there's probably hundreds available, 99% of which you'll never directly interact with in VBA). In practice, I just google the keywords CreateObject and what I'm interested in and usually I find it - a select few items that I automate on a regular basis and a very few others that I use infrequently.
 
Upvote 0
Or you could use the Registry editor. Select the HKEY_CLASSES_ROOT key Press Ctrl+F and type in ProgID , keep on pressing F3 until you find the ProgID and Class name of your target application.
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top