+ Reply to Thread
Results 1 to 3 of 3

Changing entry to Caps

  1. #1
    Registered User
    Join Date
    04-05-2006
    Posts
    6

    Changing entry to Caps

    I have a simple workbook that I would like to limit the input in columns F,G, and H begining on row 3 of each to only a capitol N or Y. I would like to use code so it automatically changes to upper case. Is this possible?

  2. #2
    Borup
    Guest

    RE: Changing entry to Caps

    You may be able to avoid code by using data validation

    IN the cell you want to control inputs select

    Data / valaidation
    Then choose "list" from the first drop down
    Then enter Y,N in the 'Source' Box

    This will force only two entries



    "TJDeborah" wrote:

    >
    > I have a simple workbook that I would like to limit the input in columns
    > F,G, and H begining on row 3 of each to only a capitol N or Y. I would
    > like to use code so it automatically changes to upper case. Is this
    > possible?
    >
    >
    > --
    > TJDeborah
    > ------------------------------------------------------------------------
    > TJDeborah's Profile: http://www.excelforum.com/member.php...o&userid=33186
    > View this thread: http://www.excelforum.com/showthread...hreadid=530041
    >
    >


  3. #3
    Scoops
    Guest

    Re: Changing entry to Caps

    Hi TJDeborah

    Try this in the worksheet's code:

    Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    With Target
    If .Column < 6 Then Exit Sub
    If .Column > 8 Then Exit Sub
    If .Row < 3 Then Exit Sub
    If .Value = "y" Or .Value = "n" Then
    .Value = UCase(.Value)
    Else
    MsgBox "Only ""Y"" or ""N"" please."
    .Select
    .ClearContents
    End If
    End With
    Application.EnableEvents = True
    End Sub


    Regards

    Steve


+ 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