.NET

Reply
*Expert Elite*
Civil3DReminders.com
Posts: 2,561
Registered: ‎10-13-2005
Message 1 of 2 (294 Views)
Accepted Solution

Excel Modeless Dialog Box

294 Views, 1 Replies
11-11-2013 09:05 AM

I want to create a modeless dialog box that is associated with Excel instead of AutoCAD. The program will run in AutoCAD and then it will open an instance of Excel. I want the ability for the user to then select a button on the modeless dialog that will import in data from the Excel Worksheet into AutoCAD. My preference is for the modeless dialog to be shown in Excel and not necessarily be tied to AutoCAD. Is this possible? My search so far hasn't been successful. 

 

Thank you,

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/

This appears to be the solution:

ExcelApplication = New Excel.Application
' Add the import export dialog box to load from Excel.
Dim excelLinkFrom As frmExcelLink = New frmExcelLink()
Dim xlMain As New NativeWindow()
xlMain.AssignHandle(New IntPtr(ExcelApplication.Hwnd))
excelLinkFrom.Show(xlMain)

 

*Expert Elite*
Civil3DReminders.com
Posts: 2,561
Registered: ‎10-13-2005
Message 2 of 2 (266 Views)

Re: Excel Modeless Dialog Box

11-11-2013 05:49 PM in reply to: Civil3DReminders.com

This appears to be the solution:

ExcelApplication = New Excel.Application
' Add the import export dialog box to load from Excel.
Dim excelLinkFrom As frmExcelLink = New frmExcelLink()
Dim xlMain As New NativeWindow()
xlMain.AssignHandle(New IntPtr(ExcelApplication.Hwnd))
excelLinkFrom.Show(xlMain)

 

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.