Doug,
This seems to work, however, I have done very little programming dealing
with the VBE.
'--
Sub Experiment()
Dim cmdBar As CommandBar
Set cmdBar = Application.VBE.CommandBars("Menu Bar")
cmdBar.Controls("Edit").Controls("Find...").Execute
Set cmdBar = Nothing
End Sub
'--
You might also want to experiment with code that Chip Pearson posted
in the Misc group today under "Code to Find Code"...
Sub AAA()
Dim FindWhat As String
Dim StartLine As Long
Dim EndLine As Long
Dim StartCol As Long
Dim EndCol As Long
Dim Found As Boolean
With Application.VBE
If .ActiveCodePane Is Nothing Then
MsgBox "No Code Pane Active"
Exit Sub
End If
With .ActiveCodePane
FindWhat = "findme"
StartLine = 0
EndLine = .CodeModule.CountOfLines
StartCol = 0
EndCol = 0
Found = .CodeModule.Find( _
target:=FindWhat, _
StartLine:=StartLine, _
startcolumn:=StartCol, _
EndLine:=EndLine, _
endcolumn:=EndCol, _
wholeword:=False, _
MatchCase:=False, _
PatternSearch:=False)
If Found = True Then
.SetSelection StartLine, StartCol, EndLine, EndCol
Else
MsgBox "Not Found"
End If
End With
End With
End Sub
'----------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)
"Doug Glancy"
wrote in message
In programming the VBE, is there any way to show it's Find/Replace dialog.
E.g., in programming Excel I could code:
Application.Dialogs(xlDialogFormulaReplace).Show
and get the Find/Replace for Excel. Any way to program the VBE one?
Thanks,
Doug