如何关闭“剪贴板”?
如果我先运行了EXCEL并在其中剪贴粘贴了(我想肯定是剪贴板被此程序所用),然后再运行了我的程序,总是出现521错误,不能打开剪贴板,用什么语句能在我程序运行前先关闭所有使用剪切板的程序呢?我的程序中用到了如下语句:SavePicture Clipboard.GetData, "c:\aa.bmp"不知我是否说明白了?
If Not Clipboard.GetData(vbCFBitmap) = 0 Then '如果返回的不是0 SavePicture Clipboard.GetData(vbCFBitmap), "c:\aa.bmp" '保存图像 End If
Dim pPic As StdPicture Set pPic = Clipboard.GetData If pPic Is Nothing Or pPic.Handle = 0 Then Else SavePicture pPic, "c:\test.bmp" End If