以下プログラムをVBAのThisWorkBookに貼り付ける
Private Sub Workbook_Open()
' 変更するセルのアドレスと変更したい値を設定します
Dim targetCellAddress As String
targetCellAddress = "A1" ' 例: セルA1を変更したい場合
' タイトルを取得します
fileTitle = ThisWorkbook.Name
fileTitle = Left(fileTitle, Len(fileTitle) - 5) ' 拡張子を含まないように削除します
Dim newValue As Variant
newValue = fileTitle ' 例: 新しい値を "新しい値" に設定します
' タイトルに基づいてセルの値を変更します
ThisWorkbook.Sheets(1).Range(targetCellAddress).Value = newValue
MsgBox "名称が更新されました。"
End Sub