|
-
Jun 13th, 2006, 08:22 AM
#1
Thread Starter
Hyperactive Member
Sendkeys problem....
Hello,
I have an Excel "Master" file that I use to open a bunch of workbooks, make changes, then save the workbook. In each of the individual workbooks, there is code that shows a messagebox if the workbook is out of balance. I want to suppress this messagebox. The code I am using is:
VB Code:
Workbooks(xTemplate).Close True
SendKeys "{Enter}"
The above code works fine for suppressing that messagebox, but it seems to be suppressing subsequent message boxes as well. How do I code it so the sendkey only applies to the above message?
Thank you.
-
Jun 13th, 2006, 08:24 AM
#2
Re: Sendkeys problem....
What event is this code in? Which msgs are you missing?
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 
-
Jun 13th, 2006, 08:30 AM
#3
Thread Starter
Hyperactive Member
Re: Sendkeys problem....
The code is in a sub that I created. The messagebox stating if the workbook is out of balance shows upon saving the workbook. It won't always show...if the workbook is in balance, the message box won't show. Maybe that is the problem. I have a couple of different messageboxes, one that shows when the update is complete, and one that shows if there were any errors while updating. These never show with the sendkeys code.
-
Jun 13th, 2006, 08:35 AM
#4
Re: Sendkeys problem....
Perhaps it would be better to rethink the logic here.
If the workbook is out of balance then if you had that written to a specific sheet or written out to a log file you could read it with out needing a msgbox in the out of balance workbook. It could all be done in the master workbook. This way it wont hold up any saves or such.
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 
-
Jun 13th, 2006, 08:46 AM
#5
Thread Starter
Hyperactive Member
Re: Sendkeys problem....
The individual workbooks get worked on individually by users. The messagebox in the save event is to make the user aware that the spreadsheet is out of balance so they can fix it. The purpose of the master file is only to reset the worksheets with new numbers for the next projection to be done.
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
|