Excel宏文件不能在没有Internet的情况下打开怎么办 [英] Excel macro file must not be open without internet how to do

查看:244
本文介绍了Excel宏文件不能在没有Internet的情况下打开怎么办的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望如果互联网关闭,那么文件不应该打开&如果上网可以打开文件



我尝试过:



i在互联网上试了很多但很失败

i want that if internet is off then file shoud not to be open & if internet is on one can open the file

What I have tried:

i tried on internet a much but failed

推荐答案

没有办法阻止文件被打开。



您可以做的最好的事情是将代码写入工作簿,检查它是否可以访问互联网,然后关闭工作簿(如果没有)。



谷歌的VBA互联网连接检查,用于测试互联网连接的例子。



坦率地说,这听起来真的很糟糕,并且会只是让用户试图打开Excel工作簿来获取数据而不关心互联网连接状态。
There is no way to prevent the file from being opened.

The BEST you can do is write code into the workbook that checks to see if it has access to the internet and then closing the workbook if it doesn't have it.

Google for "VBA internet connection check" for examples of testing for an internet connection.

Frankly, this sounds like a really bad idea and would just frustrate users trying to open an Excel workbook to get at data without caring about the internet connection state.


这篇关于Excel宏文件不能在没有Internet的情况下打开怎么办的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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