Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default How to set up a template to click on a box and an "X" will appear

I am trying to set up a template so that I can just click on a cell and an
"X" will appear. Can this be done in Excel?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How to set up a template to click on a box and an "X" will appear

Here's a macro by Bob Phillips and Dave Peterson:

This procedure let's you click on a cell in a range (defined in the code)
and places a "X" in that cell.

Bob Phillips, Dave Peterson

Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myHeight As Double
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
With Target
If .Value = "r" Then
.Value = ""
Else
myHeight = .EntireRow.RowHeight
.Value = "r"
.Font.Name = "Marlett"
.EntireRow.RowHeight = myHeight
End If
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub



This is sheet code.

Right click the sheet tab and paste into the window that opens.

If you click a cell in the range A1:100 a "X" will be placed in that cell.
If you select that cell again the "X" will be removed.

Biff

"Irishsuly" wrote in message
...
I am trying to set up a template so that I can just click on a cell and an
"X" will appear. Can this be done in Excel?



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



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