Windows()。除了一个之外,每个计算机都启动 [英] Windows().Activate works on every computer except one

查看:100
本文介绍了Windows()。除了一个之外,每个计算机都启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个奇怪的问题,我在一年前就做了一个 的宏,每个月都没有使用 。昨天我的老板告诉我,他不能再用了,这给了他一些错误。我现在在 8台计算机上尝试了宏,宏完美运行。为什么宏运行在其他人的电脑上,除了我的老板。

I have encountered a strange problem, I made macro about a year ago and it is being used every month without problems. Yesterday my boss told me, he cannot use it anymore, that it gives him some errors. I now tried the macro on 8 computers and the macro ran perfectly. Why is it that macro runs on everyone else's computer, except for my boss.

Windows("MyxlsbFile").Activate

给出的是


运行时错误'9':下标超出范围。

Run-time error '9': Subscript out of range.


推荐答案

打电话时是否可以离开文件扩展名(例如)

Whether or not you can leave off the file extension when calling (eg)

Windows("MyxlsbFile") 

Workbooks("MyxlsbFile")

取决于是否已经检查了Windows资源管理器设置隐藏已知文件类型的扩展名:如果文件扩展名显示在Windows资源管理器中,则在调用 WorkBooks()时必须包含该扩展名)

depends on whether the Windows Explorer setting "hide extensions for known file types" has been checked or not: if file extensions are shown in Windows Explorer then you must include the extension when calling WorkBooks().

我猜这是您遇到问题的一台电脑上的问题。

I'm guessing this is the issue on the one PC where you have the problem.

包括文件扩展名始终有效(只要当然没有其他错误)

Including the file extension always works (as long as there's no other error of course)

这篇关于Windows()。除了一个之外,每个计算机都启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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