office2013,vba运行出错。
运行时数据处理错误,调试逐行运行却没有问题,用老版本excel运行也没问题,有人遇到过这个情况吗,怎么解决?...
运行时数据处理错误,调试逐行运行却没有问题,用老版本excel运行也没问题,有人遇到过这个情况吗,怎么解决?
展开
4个回答
展开全部
移动版(rt)取消了vba,桌面电脑仍然存在
如果你安装了office2013,而没有找到vba,那是因为微软把他藏起来了,并且默认禁用宏
打开方法:
文件
-->
选项
-->
自定义功能区
-->
右侧
开发工具
,前面的勾打上
-->
确定!
如果你安装了office2013,而没有找到vba,那是因为微软把他藏起来了,并且默认禁用宏
打开方法:
文件
-->
选项
-->
自定义功能区
-->
右侧
开发工具
,前面的勾打上
-->
确定!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
旧版本的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”字。
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”字。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
看一下具体的代码,说明错误在什么地方
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询