Hello,
I have the following code:
the msgboxs are just my debugging, can be ignored.
tmpClipBoard might be null, as I get a 'invalid use of null' error. This code stops the error but neither branch is executed. What am I doing wrong?
I have the following code:
Code:
tmpClipBoard = CreateObject("htmlfile").ParentWindow.ClipboardData.GetData("text")
...
If tmpClipBoard <> Null Then
MsgBox (tmpClipBoard)
With New MSForms.DataObject
.SetText tmpClipBoard
.PutInClipboard
End With
ElseIf tmpClipBoard = Null Then
MsgBox ("Null")
End If
the msgboxs are just my debugging, can be ignored.
tmpClipBoard might be null, as I get a 'invalid use of null' error. This code stops the error but neither branch is executed. What am I doing wrong?
Last edited: