BIGAL Posted November 19 Posted November 19 (edited) Added to my to do list may be a couple of days. 1st comment would do alphabetically for objects. So Mtext is before Text. You are lucky that I have get objects properties code. Edited November 20 by BIGAL Quote
BIGAL Posted November 24 Posted November 24 (edited) @kidznok Check your PM Edited November 24 by BIGAL Quote
BIGAL Posted 14 minutes ago Posted 14 minutes ago (edited) Ok the "add" is only needed if you start excel as it would normally ask to select a fiel including "Blank", if you have Excel already open it will find current workbook. I need to put the add in correct spot not sure why I did not do before. This should work just replace in code. ; Count will be 0 if no excel open but if no workbooks also may return same value. Nil names. ; So a double check count /=0 and wb not "" (princ "\nOpening Excel...") ;; Try to get or create Excel instance (setq myxl (vl-catch-all-apply 'vlax-get-or-create-object '("Excel.Application"))) (if (vl-catch-all-error-p myxl) (progn (prompt "\nError: Could not start Excel.") (exit) ) ) (if (= (vlax-get-property (vlax-get-property myXL 'WorkBooks) 'count) 0) (vlax-invoke-method (vlax-get-property myXL 'WorkBooks) 'Add) ) (vla-put-visible myXL :vlax-true) (vlax-put-property myxl 'ScreenUpdating :vlax-true) (vlax-put-property myXL 'DisplayAlerts :vlax-true) Edited 13 minutes ago by BIGAL Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.