• 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.

Worksheet Copier With Hyperlinks

Tech56

Member
Hi,

Is there code that will copy the Template sheet an 'x' number of times and also insert hyperlinks to those sheets in column B of the Recipe Contents sheet table?

I have this so far that will copy the sheets but it doesn't insert the hyperlinks:

Code:
Sub Create()
'Updateby Extendoffice 20160704
    Dim I As Long
    Dim xNumber As Integer
    Dim xName As String
    Dim xActiveSheet As Worksheet
    On Error Resume Next
    Application.ScreenUpdating = False
    Set xActiveSheet = ActiveSheet
    xNumber = InputBox("Enter number of times to copy the current sheet")
    For I = 1 To xNumber
        xName = ActiveSheet.Name
        xActiveSheet.Copy After:=ActiveWorkbook.Sheets(xName)
        ActiveSheet.Name = "R-" & I
    Next
    xActiveSheet.Activate
    Application.ScreenUpdating = True
End Sub

Thank you
 

Attachments

  • Recipes Rev 1.2.xlsm
    129.8 KB · Views: 1
Back
Top