Asked by duncanb7
at 2024-07-13 11:26:54
Point:500 Replies:5 POST_ID:828513USER_ID:11059
Topic:
Visual Basic Programming;Microsoft Office Suite;Miscellaneous Programming
I have one VBA program with 2003 Excel which is working successfully in one
of my Window XP computer. But when I try to run it on my other
Window XP computer that is not working at all since I found it never pass one
do loop statement like as follows , the loop is for deleteing all
IE browser windows before running other part of program, and all IE window handle is found
by findwindow() API function.
When I'm debugging it step by step with F8 function key and going to findwindow() code area that is working and window handle id is okay and matched to the target opening IE browser window
But when going to SendMessageString code, it never report any bug or error by VBA, and it can NOT
close the IE window broswer with hdlg ,window ID.
I don't know why it doesn't work on the second WIndow XP computer but it works
fine on the first computer both computer are installed with same IE and WIndow XP system(SP3 profession one computer and home edition version on the other)
and same 2003 MS office(excel)
The only message I can have when the SendMessageString code is running, it would sound one loud beep sound or tone on my speaker. So I suspect it is error , and other API function in my
program is working and never have beep sound on my speaker when it is running.
Please advise any suggestion
Other alternative for SendMessageString to close IE window in API function ?
Duncan