Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear all,
with VBA in autocad 2021, I want to read inside an excel file.
The code is pretty simple :
Private Sub CommandButton2_Click()
Dim ExcelAppObj As Excel.Application
Set ExcelAppObj = New Excel.Application ' Lance Excel
ExcelAppObj.Visible = True ' Affiche Excel
ExcelAppObj.InputBox ("Coucou de la part d'AutoCAD !") ' Affiche un message depuis Excel
ExcelAppObj.Application.Quit ' Quitte Excel
End Sub
First line "Dim ExcelAppObj As Excel.Application" creates an "Undefined user defined type" error and I cannot understand why. Can someone help ?
Autocad is installed in C:/program files/, so should be 64bits
I use Excel from Office 365
Solved! Go to Solution.