gb71631
03-01-2016, 06:09 AM
Here is my code and I have whacked my brain out on this one....
Dim Savepath As Variant, tgr As Workbook, d8form As Workbook, sh As Worksheet
Application.ScreenUpdating = False
Set d8form = ThisWorkbook
If [a39] <> "" And [setup!c13] = False Then
If [d0!f8] = "External" Then
Savepath = [setup!b7] & [d0!t4] & ".xls"
Else
Savepath = [setup!b7] & [d0!t4] & ".xls"
End If
'[setup!c13] = True
Workbooks.Open [setup!b11]
Set tgr = ActiveWorkbook
Set sh = Sheets("TGR - TGW Form")
'Paste 8D Number
tgr.sh.Range("d8") = d8form.Sheets("d0").Range("t4") ' THIS IS WHERE I GET THE ERROR!!!
'ADD HYPERLINK
tgr.sh.Hyperlinks.Add Anchor:=[d8], Address:=Savepath.Font.Size = 11
'Customer
tgr.sh.[d4] = d8form.Sheets("d0").[y11]
'Location
tgr.sh.[i5] = d8form.Sheets("d0").[f13]
'Author
tgr.sh.[i7] = d8form.Sheets("d0").[r19]
'Issue / Description
tgr.sh.[b12] = d8form.Sheets("d2").[a7]
'Part Number
tgr.sh.[d9] = d8form.Sheets("d0").[y13]
End If
Dim Savepath As Variant, tgr As Workbook, d8form As Workbook, sh As Worksheet
Application.ScreenUpdating = False
Set d8form = ThisWorkbook
If [a39] <> "" And [setup!c13] = False Then
If [d0!f8] = "External" Then
Savepath = [setup!b7] & [d0!t4] & ".xls"
Else
Savepath = [setup!b7] & [d0!t4] & ".xls"
End If
'[setup!c13] = True
Workbooks.Open [setup!b11]
Set tgr = ActiveWorkbook
Set sh = Sheets("TGR - TGW Form")
'Paste 8D Number
tgr.sh.Range("d8") = d8form.Sheets("d0").Range("t4") ' THIS IS WHERE I GET THE ERROR!!!
'ADD HYPERLINK
tgr.sh.Hyperlinks.Add Anchor:=[d8], Address:=Savepath.Font.Size = 11
'Customer
tgr.sh.[d4] = d8form.Sheets("d0").[y11]
'Location
tgr.sh.[i5] = d8form.Sheets("d0").[f13]
'Author
tgr.sh.[i7] = d8form.Sheets("d0").[r19]
'Issue / Description
tgr.sh.[b12] = d8form.Sheets("d2").[a7]
'Part Number
tgr.sh.[d9] = d8form.Sheets("d0").[y13]
End If