Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to let Excel auto type a text string when I click in a
cell? I looking for a macro the type an "OK" when I click in cell R16C3, cell R18C3 or in R16C7. Regards, Jonas |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Try placing this code in the relevant worksheet module, NOT a general module. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim r As Range If Target.Count 1 Then Exit Sub Set r = Sheets("Sheet1").Range("C16,C18,G16") If Not Intersect(Target, r) Is Nothing Then Target = "OK" End Sub -- XL2002 Regards William "nospam" " wrote in message ... | Is it possible to let Excel auto type a text string when I click in a | cell? I looking for a macro the type an "OK" when I click in cell R16C3, | cell R18C3 or in R16C7. | | Regards, | Jonas |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you, William!
That works for me. Regards, Jonas William wrote: Hi Try placing this code in the relevant worksheet module, NOT a general module. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim r As Range If Target.Count 1 Then Exit Sub Set r = Sheets("Sheet1").Range("C16,C18,G16") If Not Intersect(Target, r) Is Nothing Then Target = "OK" End Sub -- Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I type text in a cell? | New Users to Excel | |||
I want to type a text in a cell, but I want that text to represen. | Excel Discussion (Misc queries) | |||
onclick event for cell | Excel Programming | |||
onClick action from cell selection | Excel Programming | |||
Cell onclick make cell value increase. | Excel Programming |