Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Upper Worksheet Function (03)

    Cell A1 contains the text "myfile.xls" without the quotes.

    I can not get the UPPER Worksheet Function to work. I should be easy enough but then again it has been a long week.

    Set af = Application.WorksheetFunction
    Msgbox af.UPPER(Range("A1"))


    I am returned an error message of: Object does not support this property or method.

    Thanks for looking at this,
    John <img src=/S/confused3.gif border=0 alt=confused3 width=45 height=45>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Upper Worksheet Function (03)

    UPPER is not available in VBA since it is superfluous. Instead, use the VBA function UCase:

    MsgBox UCase(Range("A1"))

    The equivalent of LOWER is LCase, and instead of PROPER, you can use StrConv with vbProperCase as second argument:

    MsgBox StrConv(Range("A1"), vbProperCase)

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Upper Worksheet Function (03)

    Thanks Hans

Posting Permissions

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