|
-
May 11th, 2005, 12:34 PM
#1
Thread Starter
New Member
Display Excel messages right inside of VB.net application
Hi,
Is there a way to show the Excel message dialog box inside of VB.net application?
At the moment all my calculation is done inside of Excel application since I want to us Excel to generation different tables and charts for the end result. I have placed some logic checks to prompt users when one of the condition is met by using the msgbox. The only problem that I have with these msgboxes are that they are displayed outside of my application which required the users to click the Excel on the taskbar in order to see the message. If the users didn't respond then my application can't continue forward. Is there a way to display the Excel message boxes either in front of my application or inside of my application so the users can see it without having to click on the Excel icon on the taskbar?
Thanks,
MT
-
May 11th, 2005, 12:57 PM
#2
Re: Display Excel messages right inside of VB.net application
Post some code. You should be able to messagebox.show in your app.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 11th, 2005, 01:24 PM
#3
Re: Display Excel messages right inside of VB.net application
 Originally Posted by RobDog888
Post some code. You should be able to messagebox.show in your app.
Unless the msgbox is from Excel directly.... which is what I understand to be the problem. In addition to the code, can you provide an example of the kind of message boxes you are getting from Excel? IS it something that can be handled in an error handler, or is it because of a calclation in Excel itself?
Tg
-
May 11th, 2005, 01:34 PM
#4
Re: Display Excel messages right inside of VB.net application
Correct TG, thats why I asked to see some code. You could always use error handling code to return an error message to your
app and not let Excel handle it. Create a function in Excel that calls your excel functions. It can contain the error handling
and return a success or failure boolean to your app.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 11th, 2005, 04:29 PM
#5
Thread Starter
New Member
Re: Display Excel messages right inside of VB.net application
RogDog888 was right about the msgbox was directly coded inside an Excel macro since my application has to depend on the Excel macro to do all the calculation, logic checks and then generating a bundle of tables and chart sheets for output inside the same Excel file where the macro was in resided in. The way I designed this is the the vb.net application is only used for the user interface but the heart of the application lie inside Excel macro where all the heavy work was done there.
If you have any info about how to display or popup the Excel msgbox right inside or in front of the VB.net application, please post the info.
By the way, the msgbox was used to prompt the user that a default assumption has been applied the user's input was falled outside of the logic boundary which the result can be achieved.
MT
-
May 11th, 2005, 04:43 PM
#6
Re: Display Excel messages right inside of VB.net application
Is there a reason for relying so heavily on the Excel macros?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 19th, 2005, 11:35 AM
#7
Thread Starter
New Member
Re: Display Excel messages right inside of VB.net application
Yes, my program is very depended on Excel macro since it was the heart of our software. All the calculation, tabulation, and graphics was generated right inside Excel and then its result was copied and displayed inside the application. By doing this we can put together a package must faster than we have to do everything right insided VB.Net since we are new to VB.NET anyway.
Since Excel macro is the heart of our application, we have a lot of logic checks in it for certain conditions. In some case the result can not be produced because of some factors then we have to display the message to tell the user that we have placed in some assumption in order for achieving some end result or else the loop can run on forever.
As I have mentioned previously, I would like to figure out a way to display any Excel messageboxes when it was needed right inside of my application by some how passing its message info to my application and then display it right inside my VB.Net application. By doing it, the user does not have to pay attention to the taskbar any Excel message while running the application.
If you have any ideas or info or example, please post them.
Thanks,
MT
-
May 19th, 2005, 12:20 PM
#8
Frenzied Member
Re: Display Excel messages right inside of VB.net application
There are several ways to handle this.
You need to make a reference in VB.Net to the Microsoft Excel Library.
Then you can move all the macro(code) in Excel to VB.Net and control it from there. The message box will appear in VB.Net since the code now belongs to the program.
OR
You can assign the value of the MSGBOX to a cell and have VB.Net look up that cell and return it to MESSAGE.SHOW.
Tran is vietnamese. You must be my countryman.
I'll Be Back!
T-1000
Microsoft .Net 2005
Microsoft Visual Basic 6
Prefer using API
-
May 24th, 2005, 11:28 AM
#9
Thread Starter
New Member
Re: Display Excel messages right inside of VB.net application
Thank you for all your helps.
I guess there is no easy way to pass the bucket (Excel Messagebox) directly from Excel to VB.NET.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|