# VBScript Rename Sheet

**URL:** <https://forum.robusta.ai/t/vbscript-rename-sheet/116>\
**Category:** FAQ\
**Created:** [May 9, 2022, 1:47pm UTC](https://forum.robusta.ai/t/vbscript-rename-sheet/116 "2022-05-09T13:47:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilayda.ipar](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robusta.ai/ilayda.ipar/32/56_2.png) [@ilayda.ipar](https://forum.robusta.ai/u/ilayda.ipar)\
**Post date:** [May 9, 2022, 1:47pm UTC](https://forum.robusta.ai/t/vbscript-rename-sheet/116/1 "2022-05-09T13:47:53Z")

</div>

You can change the name of a sheet in excel with the vbs below.

⬇

```auto
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = false
objExcel.displayalerts=false
Set objWorkbook = objExcel.Workbooks.open("C:\Users\Robusta_Project\drafts.xlsx")
Set objWorksheet1 = objWorkbook.Worksheets("")
objWorksheet1.Name = "Drafts234"
objWorkbook.save
objWorkbook.close
objExcel.Quit()
Set objWorksheet1 = Nothing
Set objWorkbook = Nothing
Set ObjExcel = Nothing
WScript.Quit

```
