我的 Excel 是 64 位的。以下代码未在 Windows 和 Excel 64 位上运行。朋友中的某个人可以为 Windows 和 Excel 64 位更新此代码吗?
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Sub command1_Click()
Dim LRet As Long
LRet = mciSendString("set CDAudio door open", returnstring, 127, 0)
End Sub
Private Sub command2_Click()
Dim LRet As Long
LRet = mciSendString("set CDAudio door closed", returnstring, 127, 0)
End Sub