How to Add and Hyperlink new sheets with VBA in Excel. Add new sheet based on the cell selected. Hyperlink the new sheet to the original cell.
For more help visit my website or email me at [email protected].
Contact me regarding customizing this template for your needs.
Excel one-on-one on-line training available. Email me to arrange.
I am able to provide online help on your computer at a reasonable rate.
Check out my next one-hour Excel Webinar
I use a Blue condensor Microphone to record my videos, here is the link
Check out Crowdcast for creating your webinars
If you need to buy Office 2019 follow
I use Tube Buddy to help promote my videos
Check them out
Follow me on Facebook
TWEET THIS VIDEO
Follow me on twitter
easyexcelanswers
IG @barbhendersonconsulting
You can help and generate a translation to you own language
*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I’ve used or have experience with.
Sub add_new_sheet()
Dim sheet_name_to_create As String
Dim sh As Worksheet, nsh As Worksheet ‘ nsh = sheet_name_to_create
Dim nrng As Range
Dim cont As Worksheet
Dim oRng As Range
sheet_name_to_create = ActiveCell.Value
Set oRng = ActiveCell
Set sh = Sheets(“Sheet1”)
For rep = 1 To (Worksheets.Count)
If LCase(Sheets(rep).name) = LCase(sheet_name_to_create) Then
MsgBox “this sheet already exists”
Exit Sub
End If
Next
Sheets(“markbreakdown”).Visible = True
Sheets(“markbreakdown”).Copy after:=Sheets(Sheets.Count)
ActiveWindow.ActiveSheet.name = sheet_name_to_create
Sheets(“markbreakdown”).Visible = False
sh.Activate
sh.Hyperlinks.Add oRng, “”, “‘” & sheet_name_to_create & “‘!A1”, _
“Go to ” & sheet_name_to_create, sheet_name_to_create
Set oRng = Nothing
End Sub