+ Reply to Thread
Results 1 to 2 of 2

If Cell Not Number Than Specific Word?

  1. #1
    JK
    Guest

    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. #2
    Chip Pearson
    Guest

    Re: 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" <[email protected]> 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1