Excel VBA保存窗口不断弹出

时间:2016-07-10 05:23:12

标签: excel vba

因此,对于此代码,我将其从另一个工作簿复制到我当前的工作簿/模块。但是,每当我运行它时,我会得到一个弹出窗口,上面写着更新值:otherfileipastedthecode from.xlsx。这个弹出窗口就在ssReport.Paste行之后。知道为什么会这样吗?任何帮助,将不胜感激。感谢。

im summaryView
Dim ssReport
Dim detailedData
Sub insertStyles()

Set summaryView = Worksheets("Summary View")
Set ssReport = Worksheets("Style-store report")
Set detailedData = Worksheets("Detailed Style-Store Level Data")
Dim currentColumn As Integer
Dim i
i = 4

' #1 loop through styles in first sheet, copy format, then loop again and copy style name/code
lastRow = summaryView.Cells(Rows.Count, "B").End(xlUp).Row
currentColumn = 2

' Loop to copy and paste format for all required styles
Do While i < lastRow

    ssReport.Select
    Range(Columns(currentColumn), Columns(currentColumn + 1)).Select
    Selection.Copy
    ssReport.Range(Columns(currentColumn + 3), Columns(currentColumn + 4)).Select
    ssReport.Paste
    Application.CutCopyMode = False
    currentColumn = currentColumn + 3
    i = i + 1

Loop
End Sub

1 个答案:

答案 0 :(得分:0)

Application.DisplayAlerts = false

没有解决这个问题?