奏
山東巡撫 臣 孫氏奏
為處理西洋字母大小寫
方式一
將範圍內所有文字都變更為大寫字母的巨集
Sub Uppercase()
' Loop to cycle through each cell in the specified range.
For Each x In Range("A1:A5")
' Change the text in the range to uppercase letters.
x.Value = UCase(x.value)
Next
End Sub
方式二
將範圍內所有文字都變更為小寫字母的巨集
Sub Lowercase()
' Loop to cycle through each cell in the specified range.
For Each x In Range("B1:B5")
x.Value = LCase(x.Value)
Next
End Sub
方式三
將資料格範圍內所有文字都變更為字首大寫字母的巨集
Sub Proper_Case()
' Loop to cycle through each cell in the specified range.
For Each x In Range("C1:C5")
' There is not a Proper function in Visual Basic for Applications.
' So, you must use the worksheet function in the following form:
x.Value = Application.Proper(x.Value)
Next
End Sub
參考一
參考二
參考三
參考四
處理西洋字母僅恭摺具
奏伏乞
皇上聖鑒謹
奏
成憲庚子年五月廿五日