By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,967 Members | 1,710 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,967 IT Pros & Developers. It's quick & easy.

How to control application

P: 2
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.CommandBars.FindControls

'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
'This code would show the "Database Merge Export Utility" dialogue box.
Set myCommand = Application.CommandBars.FindControl(ID:=test)

' Controls ???

End Sub
Jan 19 '07 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 10K+
P: 14,534
This question is being moved to the Visual Basic forum.

Jan 21 '07 #2

Expert 5K+
P: 8,434
I'm finding this question quite difficult to follow. Partly the problem is lack of context. for instance, is this in:
  • VBA (Excel? Access? other?)
  • VB6
  • VB.Net (which version?)
  • Something else
Jan 22 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.