Showing posts with label run. Show all posts
Showing posts with label run. Show all posts

How to adjust settings for Microsoft Visual Basic for Application to run Excel files with Macros for NanoCAD Free/AutoCAD

For NanoCAD Free/AutoCAD automation and Excel files with Macro running please adjust settings for Microsoft Visual Basic for Application please do these steps:

NanoCAD Free users:

1. Open Excel file, press “ALT+F11” to open Microsoft Visual Basic for Application, then “Tools - References”, add:
“nanoCAD Type Library (NCAuto.dll)”
“OdaX Type Library (OdaX_csd.dll)”,
then press OK.


2. Close Microsoft Visual Basic for Application editor.
3. Enable Macros in Excel
https://support.office.com/en-us/article/Enable-or-disable-macros-in-Office-documents-7b4fdd2e-174f-47e2-9611-9efe4f860b12

If you need to download and install NanoCAD Free, please follow these steps:
1. Download NanoCAD Free
http://nanocad.com/page/DownloadNanoCAD
2. Read official NanoCAD installation guide
http://nanocad.com/page/InstallationGuide
In PDF format
http://nanocad.com/images/InstallGuide/InstallGuide.pdf
Use video guide
http://nanocad.com/page/InstallationVideo
3. Don’t forget to register and activate NanoCAD Free.

AutoCAD users:
1. Open Excel file, press “ALT+F11” to open Microsoft Visual Basic for Application, then “Tools - References”, add:
“AutoCAD YYYY Type Library” file” (acaxXXenu.tlb),
where YYYY – YEAR of your AutoCAD Version, XX – 21, 20, 19,…(version number);
“AutoCAD Focus Control for VBA Type Library” (AcFocusCtrlXX.dll);
“AXDBLib” (axdbXXenu.tlb),
then press OK.




2. Close Microsoft Visual Basic for Application editor.
3. Enable Macros in Excel
https://support.office.com/en-us/article/Enable-or-disable-macros-in-Office-documents-7b4fdd2e-174f-47e2-9611-9efe4f860b12

How to import and run Excel Macros in .bas format

This guides describes how to import and run Excel Macros in .bas format. Macros importing will work with open Workbook.
1. Please press "ALT+F11" key combination. Microsoft Visual Basic for Applications window will appear.
2. Select from "File" menu - "Import File... (CTRL+M)".

Import_Module_01_Free-Excel-VBA.Blogspot.com

3. Select TestModule.bas from your hard drive and press "Open" button. New "Module1" will be shown in VBAProject window

Import_Module_02_View_Code_F7_Key_Free-Excel-VBA.Blogspot.com


4. To View Macros code right click and select "View Code". "TestModule" VBA macros code will be shown

Import_Module_03_View_Code_Window_Free-Excel-VBA.Blogspot.com


5. Please return to Sheet1 window, press "ALT+F8", select "TestModule" in "Macro" window and press "Run" button.

ALT_F8_Eng_Free-Excel-VBA.Blogspot.com


Your VBA macros in .bas format will be executed. These are results of  TestModule.bas macros running. You can download Book1 XLS file with TestModule.

Import_Module_04_Macros_Result_Free-Excel-VBA.Blogspot.com


Video guide: