Excel vba阻止 弹出警告信息
发布网友
发布时间:2022-05-03 11:06
我来回答
共3个回答
热心网友
时间:2022-06-19 07:18
单击“文件”选项卡下的“选项”命令按钮,如图所示:
在弹出的“Excel选项”对话框中选择“信任中心”内的“信任中心设置”命令按钮,如图所示:
在弹出的“信任中心”对话框中的“个人信息选项”中的“文档特定位置”下取消勾选“保存时从文件属性中删除个人信息”,然后单击“确定”按钮即可避免下次保存Excel文件时避免弹出“隐私问题警告”,如图所示:
热心网友
时间:2022-06-19 07:18
不知道你说的系统提示是什么。错误提示?
如果不是错误提示的话,可以使用
Application.DisplayAlerts=False
来阻止系统提示。
热心网友
时间:2022-06-19 07:19
Sub inputData()
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim m As Integer
i = 0
j = 0
k = 1
m = 1
Application.DisplayAlerts=False'/*************
For j = 1 To 5 Step 1
For i = 1 To 50 Step 1
Sheets("sheet1").Cells(i, 2 * j - 1) = i
Sheets("sheet1").Cells(i, 2 * j) = i * i / m + k
Next
k = k + 10
m = m + 1
Next
Application.DisplayAlerts=true'*/***************
End Sub
Sub try()
Dim i As Integer
Dim j As Integer
Dim X(7) As Range
Dim Y(7) As Range
Dim mySource As Range
i = 0
j = 0
Application.DisplayAlerts=False'/****************
With ActiveWorkbook.Sheets("sheet1")
Set X(0) = Sheets("sheet1").Columns(1)
Set Y(0) = Sheets("sheet1").Columns(2)
Set mySource = Union(X(0), Y(0))
Charts.Add
ActiveChart.ChartType = xlXYScatterSmooth
ActiveChart.SetSourceData Source:=mySource
For i = 2 To 5 Step 1
Set X(1) = .Columns(2 * i - 1)
Set Y(1) = .Columns(2 * i)
Charts(1).Activate
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(i).XValues = X(1)
ActiveChart.SeriesCollection(i).Values = Y(1)
Next i
End With
Application.DisplayAlerts=true'/*/****************
End Sub