VBScript - Cómo llamar al título de una ventana en VB
Publicado por Marcos (2 intervenciones) el 02/07/2018 14:29:25
Hi everyone,
I have a problem when I run my script in Excel. In some cases when I execute some comands, some warning window opens. My doubt is how to close that window in my VB script. I know I can use an IF condition, but the problem is I don't know how to name the condition.
This is the code to close the window.
So, my idea was:
The problem is that the title is not a status bar, so I need someone to help me when calling the title of the window, or another idea.
Thanks everyone.
I have a problem when I run my script in Excel. In some cases when I execute some comands, some warning window opens. My doubt is how to close that window in my VB script. I know I can use an IF condition, but the problem is I don't know how to name the condition.
This is the code to close the window.
1
session.findById("wnd[2]/tbar[0]/btn[0]").press
So, my idea was:
1
2
3
If session.findById("wnd[2]/").Text Like "*La fecha de parada indicada se encuentra*" Then
session.findById("wnd[2]/tbar[0]/btn[0]").press
End If
The problem is that the title is not a status bar, so I need someone to help me when calling the title of the window, or another idea.
Thanks everyone.
Valora esta pregunta


0