Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kennedy-han opened this issue Mar 24, 2017 · 3 comments
Open

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

kennedy-han opened this issue Mar 24, 2017 · 3 comments

Comments

@kennedy-han
Copy link

使用宏时报错: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
Copy link
Author

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

@F4bwDP6a6W
Copy link
Owner

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

@Maecenas
Copy link
Contributor

#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants