• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

create worksheet with function

curious K

New Member
Through VBA I create a worksheet with following code
Code:
Sheets("Temp").Delete
Worksheets.Add.Name = "Temp"
Now I want to assign one function to that sheet.
Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
.
.
.
End Sub
 
Use two subs like:
Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
  Call NewSht
End Sub

Code:
Sub NewSht()
  Application.DisplayAlerts = False
  On Error Resume Next
  Sheets("Temp").Delete
  Worksheets.Add.Name = "Temp"
  Application.DisplayAlerts = True
End Sub
 
Back
Top