Hi,
I previously used the following macro to copy a cell address to the clipboard, and subsequently paste elsewhere:
'Public Sub CopySelectionAddressToClipboard()
Dim rngT As Range
Dim strAddress As String
Dim dobClip As DataObject
If Application.Selection.count = 0 Then Exit Sub
Set dobClip = New DataObject
Set rngT = ActiveSheet.Range(Application.Selection.Address)
strAddress = "'" & rngT.Parent.Name & "'!" & rngT.Address
strAddress = Replace(strAddress, "$", "")
dobClip.SetText strAddress
dobClip.PutInClipboard
Set dobClip = Nothing
End Sub'
I have now got a new PC and when I paste what I have copied I get 2 question marks instead of the cell address. I am not sure on how to fix this and any help on this issue would be much appreciated.
I am using windows 10 and excel 2016 (32 bit).
Thanks
I previously used the following macro to copy a cell address to the clipboard, and subsequently paste elsewhere:
'Public Sub CopySelectionAddressToClipboard()
Dim rngT As Range
Dim strAddress As String
Dim dobClip As DataObject
If Application.Selection.count = 0 Then Exit Sub
Set dobClip = New DataObject
Set rngT = ActiveSheet.Range(Application.Selection.Address)
strAddress = "'" & rngT.Parent.Name & "'!" & rngT.Address
strAddress = Replace(strAddress, "$", "")
dobClip.SetText strAddress
dobClip.PutInClipboard
Set dobClip = Nothing
End Sub'
I have now got a new PC and when I paste what I have copied I get 2 question marks instead of the cell address. I am not sure on how to fix this and any help on this issue would be much appreciated.
I am using windows 10 and excel 2016 (32 bit).
Thanks