Browse » Home
Friday, June 7, 2013
How to Use DLL in Excel
Implementing DLL File on Visual Basic
1. Create a new DLL file on Visual Basic Studio by clicking on File and selecting 'New Project.' Go to 'Class Library' and click 'OK.'
2. Click on 'Project' and select 'ClassLibrary1 Properties' from the drop-down menu. Edit the name of the assembly as well as the root namespace to your preferred labels and open the code window.
3. Write the codes for the functions of the class and click on 'Build' from the menu bar. Go to select 'Build (Name of Library)' to create the DLL file.
4. Go to the 'Properties' command found at the bottom of the 'Project' menu. Set the description of the project to the specific string you want to see whenever you select the reference of the DLL in your Excel file.
Opening the Visual Basic DLL in Excel
5. Go to the 'Tools' menu of the Excel program and select 'References.'
6. Find the server class of your Visual Basic DLL file and click on it.
7. Add a new module to your Excel workbook by creating a function that makes a server class instance and uses the methods of the same instance.