Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MsgBoxes not showing up

Status
Not open for further replies.

maxtin

Programmer
Dec 6, 2008
8
Hi, i have this very strange problem that occurs SOMETIMES with a software where you can use vba code.

When i run the code, msgboxes fail to show up and code is continuing through. I use this software (called RSView32 from Rockwell Automation) since couple of years now, and this is the first time i see this problem. The fix is simply by restarting the application but this is very annoying since msgboxes of type vbYesNo are getting "1 (vbOk)" automatically then the code continue on (like if someone acknowledged it). After I restart the application, it works fine for a while (msgboxes are popping normally) and then (seems randomly) you dont see them popping anymore.

I have two types of msgboxes in my code and both are affected:

1. Msgbox msg

2. Response = MsgBox(Msg, Style, Title, Help, Ctxt)


Anyone already saw/experienced this?

help please...i really need to solve this
 
There is nothing in that code that, by itself, should cause the problem.

From the behaviour you describe, I would say that one of two things is happening: most likely, the call to the MsgBox routine is working correctly but the output is being trapped and automatically processed, or, perhaps, it is being hijacked in some way and some completely different routine is being invoked. Hijacking of the routine could happen in several ways, deliberately or accidentally; something in memory could be overwritten, a registry entry changed, etc., etc.

I do not know the RSView software but, from a quick look at its website, it looks like it has the potential to interfere with almost anything, and given that restarting it fixes the problem, it does seem like the guilty party. I see that you have already posted a question on an RSView32 forum and received no response; it's still probably a better forum than this to get some accurate information.

I can see that it could be a little dangerous getting an auto-response, and it is not easy to propose a work-around. The best I can think of would be time how long the response takes and, if it's too quick, assume that it must have been automatic. That still leaves the problem of how you interact with the user when you can't use Msgbox; what about a little UserForm?



Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top