突然有几个VBA宏错误,大多数是32809 [英] Suddenly several VBA macro errors, mostly 32809

查看:1686
本文介绍了突然有几个VBA宏错误,大多数是32809的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

突然间,我的excel文件在启动时产生了很多错误。

在错误开始之前,文件没有更改。

Suddenly my excel file is generating a lot of errors at startup.
No changes have been made to the file since before the errors started.

错误示例:

错误438:

Sheets("setup2").CheckBox4.Caption = "Lägg automatiskt till " & _ 
    Sheets("setup2").Range("L8").Value & " måndag efter jour."

错误32809:

Worksheets(1).Visible = True
Worksheets(1).Cells(42, 3) = ActiveWorkbook.Path
Sheets("setup").Cells(43, 3) = Environ("UserName")
Worksheets(1).Cells(35, 13) = MostRecentDate

该工作簿不受密码保护。

它是Office 2013(15.0.4659.1000)MSO(15.0.4659.1001)

The workbook is not password protected.
It's Office 2013 (15.0.4659.1000) MSO (15.0.4659.1001)

推荐答案

类似的问题。创建了一个跟踪焊接程序的应用程序。我的机器运行Windows 7和Excel 2010.我创建的任何东西,然后分发到具有不同操作系统或不同Excel版本的其他机器将有32809错误,通常与选择工作表相关联

Similar issue. Created an application to track welding procedures. My machine was running Windows 7 and Excel 2010. Anything I created, then distributed to other machines with different OS's or different Excel versions would have 32809 errors, usually associated with selecting a worksheet

Sheets(Data Entry)。选择

Sheets("Data Entry").Select

这将触发一个应用程序或运行时错误32809.
我尝试了之前提到的所有修复删除所有临时文件,.exd文件等。没有欢乐。

This would trigger an Application or run time error 32809. I tried all of the fixes previously mentioned (delete all temp files, .exd files etc. No joy.

我的解决方案(可能不适合你)

My solution ( may not work for you)

在Excel 2007的机器上打开应用程序。
将一个没有后果的注释行添加到其中一个宏中。

Opened the application on a machine that was Excel 2007. Added one comment line of code of no consequence into one of the macros

表(sheetName) 。选择
没有后果的评论

Sheets(sheetName).Select 'comment of no consequence

并保存,导致重新编译
关闭并重新启动使用Excel 2007打开 - 全部固定。

and saved it. This caused a recompile. Closed and re-opened with Excel 2007 - all fixed.

如果我在机器上添加任何代码到这些应用程序,然后分发,运行时总是有错误,除非我让应用程序在不同的系统上重新编译。我将固定版本发送到运行Excel 2007的另一台计算机上,并且运行正常。

If I add any code to these applications on my machine and then distribute, there is invariably an error when run, unless I get the application to recompile on the differing system. I sent the fixed version onto another machine running Excel 2007 and it worked fine.

希望这是有道理的,有助于

Hope this makes sense and helps

授予

这篇关于突然有几个VBA宏错误,大多数是32809的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆