I am using VBA to insert a string of text to transfer to another program using the clipboard. The issue I'm running into is that the vbTab function doesn't translate as an actual tab key being pressed. Is there a way to do this without trying to use sendkey?
VBA Code:
Private Sub btnTMP_Click()
‘Declares Variables
Dim obj As New DataObject
Dim txt As String
'Put some text inside a string variable
txt = "IN" & vbTab & Me!txtMerchNo.Value
'Make object's text equal above string variable
obj.SetText txt
'Place DataObject's text into the Clipboard
obj.PutInClipboard
End Sub