将控件\变量中的字符串复制到剪切板的函数:
Function strCopy(strText As String)
Dim objCopy As Object
Set objCopy = CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
With objCopy
.SetText strText
.PutInClipboard
End With
Set objCopy = Nothing
End Function
调用方法:strCopy(变量\控件名)