office2013,vba运行出错。

2024-11-19 00:20:50
推荐回答(4个)
回答(1):

移动版(rt)取消了vba,桌面电脑仍然存在
如果你安装了office2013,而没有找到vba,那是因为微软把他藏起来了,并且默认禁用宏
打开方法:
文件
-->
选项
-->源空
自定义功能区
-->
右侧饥皮
开发工具雹肢瞎
,前面的勾打上
-->
确定!

回答(2):

旧版本的VBA裏面要改一些代码,才能在2013裏面用,如我的答袜代码:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "拿纯user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
要改成:
Private Declare PtrSafe Function FindWindow Lib "user32" Alias "消举咐FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal Hwnd As Long, ByVal nIndex As Long) As Long
Private Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal Hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
好像多了“PtrSafe”字。

回答(3):

把具体的实例发来看看

回答(4):

看一下具体的代码,说明错误在什么地方