Devin
Board Regular
- Joined
- Jan 21, 2009
- Messages
- 105
Hi All,
I was using the below macro to copy a cell location so I could go elsewhere in the workbook an paste it. It worked fine until I updated to Excel 2016. Now when I paste, it pastes 2 question mark boxes (Char(63)).
Any ideas? Thanks!
I was using the below macro to copy a cell location so I could go elsewhere in the workbook an paste it. It worked fine until I updated to Excel 2016. Now when I paste, it pastes 2 question mark boxes (Char(63)).
Any ideas? Thanks!
Code:
Sub CopyLoc()
On Error Resume Next
Dim CopyText As String
Dim obj As New DataObject
If Trim(ActiveCell.Address & vbNullString) = vbNullString Then GoTo ExitCopyLoc
CopyText = "'" & ActiveSheet.Name & "'!" & ActiveCell.Address
obj.SetText CopyText
obj.PutInClipboard
ExitCopyLoc:
End Sub