Macro To Name New Tab From Cell In Excel - Automate Creating A Tab With A Button

Опубликовано: 07 Октябрь 2024
на канале: Excellently
103
1

In this video, I cover how to use a macro to create a sheet and have that sheet automatically named from a range. I use this functionality a lot at work to automatically create sheets for different processes.

You can use the below code by renaming the cell where your sheet name will appear and also by renaming the sheet that you would like to have active at the end of the process. Leave out "Sheets("Sheet2").Select" if you would like the new sheet to be active.

====== PROFILE ======
https://hubpages.com/@joshuacrowder

======= CODE =======
Sub Namesheet()

'name sheet from range a5

Sheets.Add.Name = Range("A5").Value

Sheets("Sheet2").Select

End Sub

===== CHAPTERS =====
00:00 Start
00:26 Add Developer Tab
01:10 Insert A Module
01:20 Enter Code
03:54 Insert Form Control Button
04:15 Test Button
04:48 Add List Box

======= TAGS =======
#msexcel #excel #excelmacro #excelvba #exceltutorial #exceltutorial #exceltips