+ Reply to Thread
Results 1 to 4 of 4

vbProperCase

  1. #1
    Registered User
    Join Date
    08-18-2015
    Location
    singapore
    MS-Off Ver
    2013
    Posts
    4

    vbProperCase

    Hi i cant seem to get this text to be in propercase. when i click the button, it did not convert the word (Cell 11) over to Cell 12. pls take a look at my coding.

    Sub Rectangle2_Click()

    Dim str As String
    Dim strconvert As String

    str = Cells(11, 1)

    strconvert = strconv(str, vbProperCase)

    Cells(12, 1) = str

    End Sub


    Result should be: example "TEST" becomes "Test".

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: vbProperCase

    Please use Code Tags when posting code.
    Like this.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: vbProperCase

    Cells(12, 1).Value = WorksheetFunction.Proper(Cells(11, 1).Value)
    Ben Van Johnson

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: vbProperCase

    Or the built-in vba function.

    Please Login or Register  to view this content.

+ 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