See the top rated post in this thread. Click here

Results 1 to 2 of 2

Thread: Auto CAD is not Opening from Excel

  1. #1
    Member
    Join Date
    2018-04
    Posts
    10
    Login to Give a bone
    0

    Default AutoCAD is not opening from Excel

    Help Urgently needed... here is the line of code

    Capture.PNG


    The error is

    Capture2.PNG


    Thanks
    Last edited by yosegmail; 2019-03-25 at 09:12 AM.

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,397
    Login to Give a bone
    1

    Default Re: Auto CAD is not Opening from Excel

    There is no application called "Jo-PC". The argument is supposed to be the class ID of a program, e.g. AutoCAD. To find out what you need to use, open REGEDIT.exe and navigate to HKEY_Classes_Root and scroll down to the "AutoCAD" section. The value should be something like "AutoCAD.Application". If you have multiple versions of AutoCAD installed, you can open a specific version by adding the version number. For 2018, mine is "AutoCAD.Application.22". 2019 is "AutoCAD.Application.23".

    As written, your code will always open a new instance of AutoCAD. If AutoCAD is already open, you could use that instance instead. See this post for some sample code. Don't forget to reset by using On Error GoTo 0.
    Last edited by Ed Jobe; 2019-03-26 at 02:41 PM.
    C:> ED WORKING....

Similar Threads

  1. Excel to Auto cad block attributes
    By pksen515343 in forum AutoCAD General
    Replies: 1
    Last Post: 2012-01-23, 12:26 PM
  2. how to activate AutoCAD after opening Excel?
    By Yancka in forum VBA/COM Interop
    Replies: 7
    Last Post: 2009-11-08, 08:17 PM
  3. Auto Printing CAD Viewports without opening CAD??
    By BoarsNest01 in forum CAD Management - General
    Replies: 2
    Last Post: 2009-05-17, 11:04 AM
  4. Auto Update Option for MS Excel Created Parts
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 0
    Last Post: 2007-09-19, 03:30 AM
  5. Replies: 2
    Last Post: 2006-04-25, 02:36 PM

Posting Permissions

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