Hi, everyone. I have this code when I'm trying to control application. These works correct, but I can’t run the next item of the application. There are buttons Finish and Cancel on the Popup, but how can I send the message of Popup-window. Application don’t take commands before or after execute. It run always application execute command end of Sub.
Sub DMEU()
'First, how to find FindControl ID for FindControl
'and Execute "Database Merge Export Utility"?
'ID: 39812
Dim myCommand As Object
Dim a
Dim b As Object
Dim buf() As Variant
Dim i As Long
Dim test
Dim testi_2
Set a = Application.Com mandBars.FindCo ntrols
'loop commandbars object
For Each b In a
i = i + 1
ReDim Preserve buf(1 To 2, 1 To i)
buf(1, i) = b.Caption
buf(2, i) = b.ID
If b.Caption = "Database Merge &Export Utility" Then
MsgBox (b.ID)
test = b.ID
End If
Next
'This code would show the "Database Merge Export Utility" dialogue box.
Set myCommand = Application.Com mandBars.FindCo ntrol(ID:=test)
myCommand.execu te
' Controls ???
End Sub
Sub DMEU()
'First, how to find FindControl ID for FindControl
'and Execute "Database Merge Export Utility"?
'ID: 39812
Dim myCommand As Object
Dim a
Dim b As Object
Dim buf() As Variant
Dim i As Long
Dim test
Dim testi_2
Set a = Application.Com mandBars.FindCo ntrols
'loop commandbars object
For Each b In a
i = i + 1
ReDim Preserve buf(1 To 2, 1 To i)
buf(1, i) = b.Caption
buf(2, i) = b.ID
If b.Caption = "Database Merge &Export Utility" Then
MsgBox (b.ID)
test = b.ID
End If
Next
'This code would show the "Database Merge Export Utility" dialogue box.
Set myCommand = Application.Com mandBars.FindCo ntrol(ID:=test)
myCommand.execu te
' Controls ???
End Sub
Comment