Dave,
I could use in stead of a find button on my spreadsheet that would
automatically let the find function work in 2 non-consecutive columns (in my
case E and G), a macro that does the same if E1, F1 or G1 is double clicked
(or right clicked). Perhaps something like the code below the dotted line
could work (if you would be so kind to correct it for me). But in the code
module of the worksheet I already have another worksheet procedure that is
triggered by a double click, it begins with:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("E:E")) Is Nothing And Intersect(Target,
Me.Range("AS:AS")) Is Nothing And Intersect(Target, Me.Range("BT:BT")) Is
Nothing Then Exit Sub
and also a procedure that reacts to a right click. It begins with:
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
Dim myShtCtBar As Object
If Target.Columns.Count = 1 Or Target.Rows.Count = 1 Then
Select Case Selection.Column
It seems that you can have only one eventprocedure of a kind in a worksheet
code module. Is there a way out?
----------------------------------------------------------------------------
-----
Private Sub Worksheet_BeforeDoubleClick( _
ByVal Target As Excel.Range, Cancel As Boolean)
If Intersect(Target, Range("E1:G1")) Is Nothing Then Exit Sub
Range("E:E,G:G").Select
Range("G1").Activate
Application.Dialogs(xlDialogFormulaFind).Show
End If
End Sub
Jack Sons
The Netherlands
"Peo Sjoblom" <PeoSjoblom@discussions.microsoft.com> schreef in bericht
news:9A623137-AE51-48E7-8354-B0AE9F62DB7E@microsoft.com...
> Try
>
> Application.Dialogs(xlDialogFormulaFind).Show
>
>
> Regards,
>
> Peo Sjoblom
>
> "marika1981" wrote:
>
> > I'm trying to write a macro (which I'll assign to an on-screen button)
that
> > simply brings up the Find dialogue box. Thus, you press the button and
the
> > Find box appears.
> >
> > When I try to record the macro, it requires I exit the dialogue box
before
> > stopping recording.
> >
> > Any ideas?????
> >
> > Thank you!!!!!
Bookmarks