Hello, all.
I have this fabulous macro that (when a link is clicked) combines data and copies the results suitable for pasting outside of Excel. This works great UNTIL I hit save. Once I do it no longer produces pasteable text unless I close and reopen the Workbook. It works fine as long as I don't save the file.
I have this fabulous macro that (when a link is clicked) combines data and copies the results suitable for pasting outside of Excel. This works great UNTIL I hit save. Once I do it no longer produces pasteable text unless I close and reopen the Workbook. It works fine as long as I don't save the file.
VBA Code:
Sub ShippingInstructions()
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("ShippingInstructions").Visible = True
Sheets("ShippingInstructions").Range("A1") = Cells(ActiveCell.Row, "B")
Sheets("ShippingInstructions").Range("E1") = Cells(ActiveCell.Row, "E")
Sheets("ShippingInstructions").Select
Range("G1").Select
Dim objData As New DataObject
Dim strTemp As String
strTemp = Replace(ActiveCell.Value, Chr(10), vbCrLf)
objData.SetText (strTemp)
objData.PutInClipboard
Sheets("Calendar").Select
Sheets("ShippingInstructions").Visible = False
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
Last edited: