Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default auto type text onclick in a cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default auto type text onclick in a cell

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default auto type text onclick in a cell

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I type text in a cell? j2t2011 New Users to Excel 1 July 28th 07 05:37 AM
I want to type a text in a cell, but I want that text to represen. ExcelQ Excel Discussion (Misc queries) 1 January 21st 05 07:45 PM
onclick event for cell ties Excel Programming 4 July 20th 04 12:09 PM
onClick action from cell selection Beanymonster Excel Programming 4 July 16th 04 09:25 PM
Cell onclick make cell value increase. Cali92 Excel Programming 6 September 28th 03 02:27 AM


All times are GMT +1. The time now is 05:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"