The three subs below work fine in windows 7, unfortunatelyI upgraded to windows 10 a few days ago and now it will not work. I get ?? when I paste. Anyone know how I can fix this.
HTML:
Sub Invoicenumber()
PlayTheSound "Speech Disambiguation.wav"
Dim clipboard As MSForms.DataObject
Dim str1 As String
Set clipboard = New MSForms.DataObject
str1 = Cells(6, 16).Value
clipboard.SetText str1
clipboard.PutInClipboard
End Sub
HTML:
Sub GetTracking()
Dim INVT As Workbook
Dim Invoice As Worksheet
Set INVT = Workbooks("Invoice Template.xlsm")
Set Invoice = INVT.Sheets("Invoice")
Invoice.Activate
Dim clipboard As New MSForms.DataObject
Dim str1 As String
Set clipboard = New MSForms.DataObject
str1 = Cells(7, 24).Value
clipboard.SetText str1
clipboard.PutInClipboard
Set MSForms_DataObject = Nothing
End Sub
HTML:
Sub URLS()
PlayTheSound "Speech Disambiguation.wav"
Dim str1, str2, str3, str4, str5, str6, str7 As String
Dim clipboard As MSForms.DataObject
Set clipboard = New MSForms.DataObject
str1 = "http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?strOrigTrackNum="
str2 = Cells(7, 24).Value
str3 = "&Go+to+Track+%26+Confirm.x=9&Go+to+Track+%26+Confirm.y=6"
str4 = str1 & str2 & str3
str5 = Cells(45, 6).Value
str6 = "http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums="
str7 = str6 & str2
If InStr(str5, "USPS") = 1 Then
clipboard.SetText str4
clipboard.PutInClipboard
Else
clipboard.SetText str7
clipboard.PutInClipboard
End If
End Sub