ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA coding for all capital letters (https://www.excelbanter.com/excel-programming/298414-vba-coding-all-capital-letters.html)

MissH

VBA coding for all capital letters
 
I know absolutely nothing about VBA coding. I am trying to return the date using the today function in all capital letters. I searched and seen some VBA coding for this but I don't know the first thing about how to get started. Can someone help?

Don Guillett[_4_]

VBA coding for all capital letters
 
put this in your personal.xls and use as desired.

Sub ChangeCase() 'Don Guillett
Application.ScreenUpdating = False
Dim r As Range
nCase = UCase(InputBox("Enter U for UPPER" & Chr$(13) & " L for
lower" & Chr$(13) & " Or " & Chr$(13) & " P for Proper", "Select
Case Desired"))
Select Case nCase
Case "L"
For Each r In Selection.Cells
If r.HasFormula Then
r.Formula = LCase(r.Formula)
'R.Formula = R.Value
Else
r.Value = LCase(r.Value)
End If
Next

Case "U"
For Each r In Selection.Cells
If r.HasFormula Then
r.Formula = UCase(r.Formula)
'R.Formula = R.Value
Else
r.Value = UCase(r.Value)
End If
Next
Case "P"

For Each r In Selection.Cells
If r.HasFormula Then
r.Formula = Application.Proper(r.Formula)
'R.Formula = R.Value
Else
r.Value = StrConv(r.Value, vbProperCase)
End If
Next
End Select
Application.ScreenUpdating = True
End Sub

--
Don Guillett
SalesAid Software

"MissH" wrote in message
...
I know absolutely nothing about VBA coding. I am trying to return the date

using the today function in all capital letters. I searched and seen some
VBA coding for this but I don't know the first thing about how to get
started. Can someone help?



Tushar Mehta

VBA coding for all capital letters
 
What does it mean to have a date in uppercase? Today's date, for
example is 05/15/2004 in one particular format and 15/05/2004 in
another format and...and...and stored in XL as a number of days since
1900 (or, depending on an option, 1904).

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I know absolutely nothing about VBA coding. I am trying to return the date using the today function in all capital letters. I searched and seen some VBA coding for this but I don't know the first thing about how to get started. Can someone help?


Don Guillett[_4_]

VBA coding for all capital letters
 
After re-reading your post
Sub todayincaps()
MsgBox UCase(Format(Date, "DDD"))
'or
range("a2")=UCase(Format(Date, "DDD"))
End Sub


--
Don Guillett
SalesAid Software

"MissH" wrote in message
...
I know absolutely nothing about VBA coding. I am trying to return the date

using the today function in all capital letters. I searched and seen some
VBA coding for this but I don't know the first thing about how to get
started. Can someone help?



Rob van Gelder[_4_]

VBA coding for all capital letters
 
Perhaps you're looking for a formula:
=UPPER(TEXT(TODAY(), "DD-MMM-YYYY"))

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"MissH" wrote in message
...
I know absolutely nothing about VBA coding. I am trying to return the date

using the today function in all capital letters. I searched and seen some
VBA coding for this but I don't know the first thing about how to get
started. Can someone help?




All times are GMT +1. The time now is 03:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com