GetClipboardData доставит дескриптор в блок глобальной памяти.
Вам придется заблокировать этот блок и получить строку оттуда.
Основанный на windows-api/retrieve-information-from-the-clipboard быстрый грязный пример, основанный на вашем вопросе:
Public Declare Function GetClipboardData Lib "user32" (ByVal wFormat As Long) As Long
Public Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function CloseClipboard Lib "user32" () As Long
Public Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long
Public Declare Function GlobalUnlock Lib "kernel32" (ByVal hMem As Long) As Long
Public Declare Function lstrcpy Lib "kernel32" (ByVal lpString1 As Any, ByVal lpString2 As Any) As Long
Public Const CF_TEXT = 1
Public Const MAXSIZE = 4096
Sub test()
Dim wat As String
Dim hClipMemory As Long
Dim lpClipMemory As Long
Dim Dummy As Long
If OpenClipboard(0&) <> 0 Then
hClipMemory = GetClipboardData(CF_TEXT)
If Not IsNull(hClipMemory) Then
lpClipMemory = GlobalLock(hClipMemory)
If Not IsNull(lpClipMemory) Then
wat = Space$(MAXSIZE)
Dummy = lstrcpy(wat, lpClipMemory)
GlobalUnlock (hClipMemory)
End If
End If
MsgBox wat
CloseClipboard
End If
End Sub