View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default ucase 'data type mismatch'

try this

Option Explicit
Dim cell As Range
Sub test()
For Each cell In Selection
cell.Value = UCase(cell.Value)
Next
End Sub

--


Gary


"DKY" wrote in message
...

I'm trying to make my selection uppercase by doing something like this.

Selection.Value = ucase(Selection.Value)

and it keeps giving me a data type mismatch error. What am I doing
wrong here?


--
DKY
------------------------------------------------------------------------
DKY's Profile:
http://www.excelforum.com/member.php...o&userid=14515
View this thread: http://www.excelforum.com/showthread...hreadid=565539