View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default loading another application from excel vba

If you cannot be sure that a machine has that program and typelib installed,
you cannot (or at least should not) declare any variables of types that are
defined in the program. For example,

' Instead of
Dim V As YourProg.SomeType
' Use
Dim V As Object

If you use the first line of code and the machine doesn't have the program
installed, the compiler will complain that SomeType is an unknown type,
probably before any of your code in the workbook executes.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"badazizi" wrote in message
...
I want to be able to launch another vba-enabled application from an Excel
command button. I have the code and references to do this already.
However,
I need to figure out how I can programmatically check to see if the
computer
has the application installed before I try to dim an object for the
application. I need to do this because the Excel file would be used by
people that don't have the application as well as those that do. I want
to
give the users that don't a meaningful error if they don't have it. How
would I go about doing that?