0
因此,對於此代碼,我將它複製到另一個工作簿的當前工作簿/模塊中。但是,每當我運行它時,我都會看到一個彈出窗口,顯示Update Values:otherfileipastedthecodefrom.xlsx。該彈出窗口緊跟在ssReport.Paste行之後。任何想法爲什麼發生這種情況?任何幫助,將不勝感激。謝謝。Excel VBA保存窗口不斷彈出
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
你也複製一些公式嗎?那些公式是否包含遠程工作簿引用以從其他文件中提取代碼?有鏈接表嗎? – Jeeped
我有表13的參考,但它在每個文件中的命名相同。什麼是鏈接表? – bugsyb
[Excel鏈接表](https://www.bing.com/search?q=excel+linked+table) – Jeeped