Results 1 to 3 of 3

Thread: VB - CreateObject()

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    1

    Question VB - CreateObject()

    Hi I was just asking a friend yesterday how I would go on writing a code that would initialize applications on my desktop. He then told me to search about CreateObject(). I learned that you need to declare the object like
    Dim PS as object
    then on a command button I would write
    Set PS = CreateObject("photoshop.application") and once it was clicked it would start up photoshop! That's great I love it haha but I'm kinda new to it so I'm having trouble. I tried writing the same code to start up Winamp but it wouldn't work. Sometimes a message box says ActiveX was unable to initiliaze something.. or w.e. So please tell me. How would I find out what to write for let's say a Game, or some any other application?? How and where do I find the correct code for each program? THANKS U!!

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: VB - CreateObject()

    Moved from CodeBank

  3. #3
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Re: VB - CreateObject()

    With CreateObject you can only create COM objects.
    If the application is not registrered as COM object, you can't use it.

    Have a look at Shell or ShelExecute instead.
    Frans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width