2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【ExcelVBA】シート名を変更するVBAソースコード

Last updated at Posted at 2024-10-05

はじめに

シート名を変更するVBAソースコードを調べ、実装、テストしました

ソースコード

ソースコードは以下の通りです。

Sub rename_test()
    Dim sheet_name As String
    sheet_name = Worksheets(2).Name
    If sheet_name = "test1" Then
        sheet_name = "名簿"
        Worksheets(2).Name = sheet_name
    End If
End Sub

最後に

意外と簡単でした

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?