Consulting

Results 1 to 5 of 5

Thread: Solved: Capitalising?

  1. #1
    VBAX Regular
    Joined
    Jun 2006
    Posts
    27
    Location

    Solved: Capitalising?

    Hi - Is it possible to capitalise the text in a cell. I'm using a portion of a filename (wb3) as part of the saved name of wb2.
    To capture the part I want
    [VBA]
    Sheets("List").Select
    ActiveSheet.Cells(9, 3).Value = Mid(wb3.Name, 19, Len(wb3.Name) - 37)[/VBA]
    returns stuff like i04x-g but I need it to be I04X-G when using it in the filesave

    [VBA]
    ActiveWorkbook.SaveAs Filename:="Toxic Gas - " & Cells(9, 3)[/VBA]
    Any way to force it to be capitals during the capture, filesave or somewhere else?

    Cheers
    -cdbrown

    PS - I'm sure there's more questions to come

  2. #2
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    use the function Ucase(YourString)

  3. #3
    VBAX Regular
    Joined
    Jun 2006
    Posts
    27
    Location
    You, my friend, are a champion. Thank you very much
    [VBA]ActiveSheet.Cells(9, 3).Value = UCase(Cells(9, 3))[/VBA]

  4. #4
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    it's a pleasure.

  5. #5
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Also, no need to Select ..

    [vba]Sheets("List").Cells(9, 3).Value = Mid(wb3.Name, 19, Len(wb3.Name) - 37)[/vba]

    HTH

Posting Permissions

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