Thread
:
Run a macro after clicking into cell
View Single Post
#
5
Posted to microsoft.public.excel.worksheet.functions
Don Guillett
external usenet poster
Posts: 10,124
Run a macro after clicking into cell
Sent him this to replace a bunch of very long macros.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Intersect(Target, Range("L6:L21")) Is Nothing Then
mysht = Application.Substitute(target, " ", "")
Range("m2") = Target
Range("m6:x21").Value = _
Sheets(mysht).Range("c6:n21").Value
End If
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Don Guillett" wrote in message
...
You really didn't give enough info but you could probably use a
double_click event from the sheet module or even a drop down list. Send
the workbook to my address below if you would like me to take a look at
making this better.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Esradekan" wrote in message
...
I have a master grid of Sports Teams (Aussie Rules), that the macros
copy and paste from the team sheets so I can see at a glance the team
home and away status, game results etc.
ie. If i want to view the Adelaide team stats, and game results etc,
i wish to copy from the team page those stats, simple copy/paste macro
(AdelaideScores). If I want Brisbane stats, I click into the Cell
with Brisbane in it, and run the macro BrisbaneScores.
Makes it easier for team comparisons.
I already have the copy/paste macros done, (ie AdelaideScores,
BrisbaneScores etc) and the grid where the macros paste, just would
rather do it by clicking in the team cell, than assigning the macro to
an object. Its tidier.
Does that make sense? Hope so
TIA for help
Esra
On Wed, 26 Mar 2008 17:39:53 -0500, "Don Guillett"
wrote:
Easily done but give us all the detail and the code. There is probably an
easier way.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett