473,320 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Auto Answer a Msgbox that appears upon opening file

2
I have a macro that loops through and opens a number of files. In each file there is an event procedure upon opening that displays an informational msgbox (The only option is to click ok). I'm trying to have my code click okay so that I don't have to sit here and hit enter (literally hundreds of times) as each file opens. Application.diplay alerts = false does not work, and changing the msgbox event procedure is unfortunately not an option. Any code that would take care of this would be greatly appreciated.
Jul 21 '10 #1
2 1881
vb5prgrmr
305 Expert 100+
This really depends upon your code and what you are doing, but, one can accomplish this with the EnumChildWindows API to look for the msgbox and then use it to find the button handle. Then you can use SendMessage to send WM_MBUTTONDOWN AND WM_MBUTTONUP messages to the button to simulate a click on it...



Good Luck
Jul 22 '10 #2
PaulSW
2
Thanks for the suggestion.
Jul 22 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Eric Caron | last post by:
Hi Here's my problem, I create a windows service with Config.xml file. All setup for my service is in this file. I create a windows application to manage these settings (Config.XML File). This...
2
by: Fraser Ross | last post by:
I want to prevent std::basic_ifstream from opening a file for reading when it is passed the file name with any wrong case of a letter. If that can't be done is there anything else that could be...
1
by: Alfons | last post by:
Hello, I have build a program that can do file transferring between a Windows XP computer and a DOS computer via a serial port. The Windows program I have build in C++ with Visual Studio 6.0....
0
by: (Pete Cresswell) | last post by:
I've been plagued by these over the years. The text is something to the effect of "Object doesn't exist". Today I started getting the error upon opening a multi-subform form that's been...
28
by: Madhur | last post by:
Hello what about this nice way to open a file in single line rather than using if and else. #include<stdio.h> void main() { FILE *nd; clrscr();...
3
by: Alvo von Cossel I | last post by:
hi, i have a working console app. however, it closes as soon as it opens. i know that it works because i can just about read it. how do i stop it from closing straight after opening? -- Alvo...
0
by: MLH | last post by:
I have a main report with a subreport on it. Main name: rptInvoiceMain Sub name: rptInvoiceSubReport The main report is unbound. A fiew calculated controls are all it has. The subreport is...
5
by: bimeldip | last post by:
Hi, I an tryin to create a html page where users can choose a file and open it however, i keep getting it wrong.So far this is wat i've worked on: (open.html) <html> <head> <title>Opening...
1
by: Cancionero | last post by:
AllCon, I am currently creating a standard executable which, of course, starts with a form. I would like to set some variables to control some of the controls (i.e. set some optionbutton captions...
7
by: dorandoran | last post by:
I used this article (http://www.codeproject.com/KB/webforms/EditNestedGridView.aspx) to accomplish expand/collaspe grid. I also added a search and it works. but i need to be now automatically expand...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.