Brilliant! I knew it had to be something simple I was overlooking. Thank you so much.
This solves half the problem. The other half remains.
- I click the control button in workbook A to open my userform.
- I navigate to Workbook B and select/copy the needed cells.
- When I go back to workbook A and click the "Paste" button I added to the form, nothing happens. It works if I keep workbook B active and click "Paste." What gives? Here's the code for the pasting process:
Private Sub BTNpaste_Click()
Dim cbUPCs As String
If LBmyGroups.ListIndex <> -1 Then
cbUPCs = ParseData
TBupcs.Text = cbUPCs
End If
End Sub
Function ParseData() As String
Dim objData As MSForms.DataObject
Dim varData, strData As String
Set objData = New MSForms.DataObject
On Error Resume Next
objData.GetFromClipboard
ParseData = objData.GetText
End Function
Thanks for your help!
Bookmarks