Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim and Greg,
Thanks. I am already working with some code of Chip's for finding code. At some point I thought it would be great to bring up the Find/Replace dialog, and fill in the args the way I could with the Excel dialog. Since it doesn't look like I can do that without fiddling as Greg described, I'll probably just stick with code like Chip's all the way. Thanks, Doug "Jim Cone" wrote in message ... 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...").Execut e 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Programming the Find Dialog Box | Excel Programming | |||
FIND AND REPLACE DIALOG BOX | Excel Discussion (Misc queries) | |||
Excel Find/Replace Dialog Box | Excel Discussion (Misc queries) | |||
Pulling up the Find and Replace Dialog via Code | Excel Programming | |||
Find/Replace built-in dialog in XP | Excel Programming |