I was able to find a problem to my own problem, I am not sure if there is a better way, but what I did was to make a mastersheet in my data workbook that has this code on the sheet,

Public sheetopened As Boolean

Private Sub worksheet_activate()
If sheetopened = False Then
ThisWorkbook.RefreshAll
sheetopened = True
End If
End Sub


I then put code on the "ThisWorkbook" sheet in the VBA editor so that the master sheet was copied every time that a new sheet is created so that the new sheet has the update code. Here is that code:

Private Sub Workbook_NewSheet(ByVal Sh As Object)
Dim tmpName As String

tmpName = Sh.Name
Sheets("MasterSheet").Copy Before:=Sheets(Sh.Name)
Application.DisplayAlerts = False
Sheets(Sh.Name).Delete
Application.DisplayAlerts = True
Sheets("MasterSheet (2)").Name = tmpName
Sheets(tmpName).Visible = True
Sheets(tmpName).Activate
End Sub

This then made it so that when my normal macro runs to make the pivot tables and copy them to new workbooks the update code is copied with it. The only thing that I had to do was to make it so that the user has to change sheets to select the sheet with the pivot table in order for the update code able to work as it will not run when the workbook is opened unless the user leaves and returns to the sheet with the pivot table. I hope this helps anyone who is having the same problem that I was having.