防止VBA中的覆盖警告 [英] Prevent Overwrite Warning in VBA

查看:37
本文介绍了防止VBA中的覆盖警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个宏,以将XML数据从Web API提取到电子表格中.第一列包含两个用逗号分隔的字段,因此我扩展了宏以插入一列,然后运行文本到列"来拆分数据.

I am writing a macro to extract XML data from a Web API into a spreadsheet. The first column contains two fields delimited with a comma so I have extended the macro to insert a column then run Text to Columns to split out the data.

该宏确实运行良好,但是我收到一个烦人的警告,询问是否要替换数据:

The macro works really well, but I get an annoying warning asking if I want to replace the data:

有没有一种方法可以抑制警告?

Is there a way to suppress the warning?

推荐答案

来源: SolutionSite

禁止显示警告

Application.DisplayAlerts = False

要激活警告:

Application.DisplayAlerts = True

这篇关于防止VBA中的覆盖警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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