the first line clicks on a button
the control goes to next page and all details from clipboeard are copied to this page
after this a error pops up.....hope can i close that error box.........2nd line is for closing the error box.........but i dont know how to call it after the pasting process is completed
thanks and regards
vivek.s
Last edited by vivek.shankar; Dec 2nd, 2004 at 03:35 PM.
hi,
i dont have to resolve the error.........cause i am automating the application using vb code..........and i ahve to close errors wherevre they popup.......well my situation is like this.....
1) i click on the submit button
2) in the next page whetever is iin the clipboard gets pasted automatically
3)now a error message box arises
4)now i have to close the error b message box.
5)but problem is i ahve to wait till the pasting operation completes......
this will go into infinite loop..........cause the error message box appears after pasting the contents from clipboard........and pasting will not occur and application will hang......
any other way out?
thanks and regards
vivek.s
1) i click on the submit button
2) in the next page whetever is iin the clipboard gets pasted automatically
3)now a error message box arises
4)now i have to close the error b message box.
5)but problem is i ahve to wait till the pasting operation completes......
u want me to put this loop between step 1 and step2
so it hangs up..........i wud like a way to put it between step 2 and step3.........for that we have to know when the pasting operation gets completed.........any options?
hi,
well i have attached the screen shot of the form........the error box appears on top..........behind that is the pasted text.........now the error box appears after the text is pasted.........so i have to suppress the error box after the pasting operation gets completed.........
what i am actually doing is .........automating a msaccess application using vb code.......so i am not supposed to touch the msaccess code.........i have to just close any error box that arises......i clicked a button in another form ..........and it opens up this form and copies all the data from clipboard.........and this error message arises after that.......(the error message is due absence of some table i guess......but i am not supposed to do anything with that access application).........now aim is to close that error box.......
use spy++ to get the class of the error box then use FindWindow API to get the Window Handle(use the loop i gave) then after the loop send a message to the error box using the Window Handle with SendMessage API the message to send is WM_CLOSE
this is the button the first form which i am clicking.
Call SendMessage(GetWindow(FindWindow("#32770", "Manual Import"), GW_CHILD), BM_CLICK, 0, 0)
now the control is transferred to next form.
here all the data from clipboard is copied.
after this a error message box arises.
now for closing this u wanted me to include the following
while hello=0
hello= FindWindow("#32770", "Microsoft Visual Basic")
wend
My question is:
how wud i find when the pasting operation gets completed to use this code
while hello=0
hello= FindWindow("#32770", "Microsoft Visual Basic")
wend
because if i use this before the text is pasted then the pasting operation would wait infinitely.this is beacuse the error message appears only after pasting operation gets completed.
vivek, I couldnt view your screen shot, but what are you pasting
into? Grid, tabel, or ??? Maybe if you already know the number of
rows you are pasting then perhaps you could make some knind
of check against the table to see when those number of rows are
completely added?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
hi guru,
yes they r pasting into a table and each line pasted is a record......how can determine the no. of recored from data in clipboard.and even if i do how can follow the no.of recored copied?
Well it would depend on how you are getting the data to the clipboard.
To check in the access table, get the recordcount before and then
keep checking until the recordcount mathces your variable that
would how the rc.
HTH
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.