PDA

View Full Version : Solved: Capitalising?



cdbrown
06-30-2006, 01:18 AM
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

Sheets("List").Select
ActiveSheet.Cells(9, 3).Value = Mid(wb3.Name, 19, Len(wb3.Name) - 37)
returns stuff like i04x-g but I need it to be I04X-G when using it in the filesave


ActiveWorkbook.SaveAs Filename:="Toxic Gas - " & Cells(9, 3)
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

ALe
06-30-2006, 01:26 AM
use the function Ucase(YourString)

cdbrown
06-30-2006, 02:22 AM
You, my friend, are a champion. Thank you very much
ActiveSheet.Cells(9, 3).Value = UCase(Cells(9, 3))

ALe
06-30-2006, 02:25 AM
it's a pleasure.

Zack Barresse
06-30-2006, 11:05 AM
Also, no need to Select ..

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

HTH