Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default program cell to display any character when cell is active

In Excel, I would like a cell to automatically insert a letter when it is
clicked or active.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default program cell to display any character when cell is active

Hi David,

Try:
'=============
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const myLetter As String = "Z"
Const sAddress As String = "A1"

If Not Intersect(Range(sAddress), Target) Is Nothing Then
Range(sAddress).Value = myLetter
End If
End Sub
'<<=============

This is worksheet event code and should be pasted into the worksheets's code
module (not a standard module and not the workbook's ThisWorkbook module):

Right-click the worksheet's tab
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.


---
Regards,
Norman



"David is learning" <David is wrote in
message ...
In Excel, I would like a cell to automatically insert a letter when it is
clicked or active.



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
Display contents of active cell in another cell? Woodstock Excel Discussion (Misc queries) 1 March 20th 09 09:16 PM
referring to formula in a non active cell from active cell nickname Excel Discussion (Misc queries) 1 June 21st 07 12:11 PM
Dynamically display in Active Cell value from 2 rows above it Jocko_MacDuff116 Excel Discussion (Misc queries) 4 May 12th 07 04:08 AM
Dynamically display in active cell the value x-rows above it? Jocko_MacDuff116 Excel Discussion (Misc queries) 0 May 12th 07 01:24 AM
Display of Active Cell in MS Excel 2007 Jasper Excel Discussion (Misc queries) 1 March 28th 07 08:36 PM


All times are GMT +1. The time now is 03:41 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"