MaCK
MaCK

Reputation: 11

VBA subroutine that changes all worksheet names in workbook

I am looking for a subroutine that will allow me to read the names of all the worksheets in a workbook, and convert the names to all upper-case letters.

Upvotes: 0

Views: 41

Answers (1)

Davesexcel
Davesexcel

Reputation: 6982

Try this

Sub Button1_Click()
    Dim sh As Worksheet
    For Each sh In Sheets
        sh.Name = UCase(sh.Name)
    Next sh
End Sub

Upvotes: 2

Related Questions