Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JK JK is offline
external usenet poster
 
Posts: 78
Default If Cell Not Number Than Specific Word?

How do I write a procedure that would make the cell value the word "Studio"
if it is not a number (1 or 2 or 3 or 4 or 5)? It would be in the page's
Selection_Change because the cell can be written to from another form also.
Thank you in advance.

Jim Kobzeff


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default If Cell Not Number Than Specific Word?

Are you sure you want it in the SelectionChange event? It seems
that the Change event would be more appropriate.

Private Sub Worksheet_Change(ByVal Target As Range)
If IsNumeric(Target.Text) = False Then
Application.EnableEvents = False
Target.Value = "Studio"
Application.EnableEvents = True
End If
End Sub




--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JK" wrote in message
news:uzx8e.35301$qO6.3052@trnddc05...
How do I write a procedure that would make the cell value the
word "Studio" if it is not a number (1 or 2 or 3 or 4 or 5)?
It would be in the page's Selection_Change because the cell can
be written to from another form also. Thank you in advance.

Jim Kobzeff



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
Counting number of times a specific word appears in a single cell Ken Curtis Excel Discussion (Misc queries) 19 June 16th 09 05:34 AM
Link from a specific Cell in Excel to a specific para. in Word CathyK Excel Worksheet Functions 0 August 10th 06 04:40 PM
Linking a Specific Word to a Specific Number [email protected] Excel Worksheet Functions 1 July 11th 06 05:55 PM
Linking a Specific Word to a Specific Number [email protected] Excel Worksheet Functions 2 July 11th 06 05:50 PM
Linking a Specific Word to a Specific Number [email protected] Excel Worksheet Functions 1 July 11th 06 04:29 PM


All times are GMT +1. The time now is 05:51 PM.

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

About Us

"It's about Microsoft Excel"