Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
action on lostfocus in a cell
Hi NG
I've tried to make a Excel VBA macro to take the value from a cell - cell M3 - when focus is leaving that cell, but I'm not able to do that :-( Any one in here, who can help me plz |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
action on lostfocus in a cell
You'll probably need to use the selectionChange event in the worksheet. I
don't know how to check if M3 was active before the selection change. You could try something like: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Range("M3").copy Range("A1").PasteSpecial Application.CutCopyMode = False End Sub "Einar" wrote: Hi NG I've tried to make a Excel VBA macro to take the value from a cell - cell M3 - when focus is leaving that cell, but I'm not able to do that :-( Any one in here, who can help me plz |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
action on lostfocus in a cell
Hi to all
This is a step in correct direction. Try this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static oldRange As Range If Not oldRange Is Nothing Then If oldRange.Address = "$M$3" Then MsgBox "Do your stuff" End If End If Set oldRange = Target End Sub Hoop that helps, Wouter |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
action on lostfocus in a cell
"Executor" skrev i en meddelelse
oups.com... Hi to all This is a step in correct direction. Try this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static oldRange As Range If Not oldRange Is Nothing Then If oldRange.Address = "$M$3" Then MsgBox "Do your stuff" End If End If Set oldRange = Target End Sub Hoop that helps, Wouter Exatly what I needed - after I discovered that it not was in module, but in sheet (ark in danish) I should put it. Tnx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excell copy action pauses for 15 second for the smallest action | Excel Discussion (Misc queries) | |||
action on cell activate | Excel Programming | |||
Action after Activate a cell | Excel Programming | |||
defining an event procedure (lostfocus) that works on a column range | Excel Programming |