Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default is text capital

I'd like to use VBA to determine if the text in strMyString is all capital
(upper case) letters, but I'm not sure how. Any ideas?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default is text capital

Hi Dave,

Try:

'====================
Function IsAllUcase(sStr) As Boolean
IsAllUcase = sStr = UCase(sStr)
End Function
'<<====================

'====================
Public Sub TestIt()
Dim Arr As Variant
Dim i As Long

Arr = Array("abc", "ABc", "ABC")

For i = LBound(Arr) To UBound(Arr)

Debug.Print Arr(i), IsAllUcase(Arr(i))
Next
End Sub

'<<====================


---
Regards,
Norman



"Dave B" wrote in message
...
I'd like to use VBA to determine if the text in strMyString is all capital
(upper case) letters, but I'm not sure how. Any ideas?




  #3   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default is text capital

If UCase(strMyString) = strMyString Then ....

--
Ian
--
"Dave B" wrote in message
...
I'd like to use VBA to determine if the text in strMyString is all capital
(upper case) letters, but I'm not sure how. Any ideas?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Capital Text reza Excel Discussion (Misc queries) 8 January 28th 10 11:23 AM
text to columns using capital letters Josh Craig Excel Discussion (Misc queries) 2 March 23rd 09 05:31 AM
I did not obtain to transform text of small letter for capital le Claudio Excel Discussion (Misc queries) 1 July 24th 07 12:25 PM
Text to Coloumns, by consecutive capital letters paperclip Excel Worksheet Functions 2 July 20th 06 12:38 PM
how do I convert text in excel to 1st letter capital,only jmfp Excel Worksheet Functions 1 June 16th 05 08:11 PM


All times are GMT +1. The time now is 07:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"