FLY_US icon indicating copy to clipboard operation
FLY_US copied to clipboard

Mac 再要你命3000[office2007].xlsm 无法使用宏

Open kennedy-han opened this issue 7 years ago • 3 comments

使用宏时报错:Compile Error Syntax Error This workbook 20:0

之后弹出一个 visual basic editor

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
 If (bAuto <> "_") Then Exit Subb

kennedy-han avatar Mar 24 '17 12:03 kennedy-han

control + alt + T 和 control + alt + O 可以用 control + alt + up | down 不可用

kennedy-han avatar Mar 24 '17 12:03 kennedy-han

如果宏报错一般是excel版本的问题。

F4bwDP6a6W avatar Mar 28 '17 01:03 F4bwDP6a6W

#4 检查发现是宏中的 Declear 语句在64位系统上的适用性问题,已经检查修复,发了一个 Pull request。

from Private Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long to Private Declare PtrSafe Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As LongPtr) As LongPtr

References: https://msdn.microsoft.com/en-us/library/office/ee691831%28v=office.14%29.aspx?f=255&MSPPError=-2147217396

Maecenas avatar Aug 22 '17 08:08 Maecenas