我基本上有一組彙總表,從一百個左右的工作表一起提取信息 - 一個摘要是當前週期的信息和我搞亂的信息現在將當前週期信息分解到各個部門會計年度跟蹤表。爲了移動信息,我的代碼工作得很好,但是在複製信息之後,我無法獲得正確的語法來設置/選擇正確的範圍,以便在新添加的信息周圍設置邊框。我移動信息的代碼是:試圖設置相同的行,但不同的列的範圍上的邊界
Sub FYFTEE()
Dim shtCurrent As Worksheet
Dim shtFY As Worksheet
Dim LastCol As Long
Dim CopyRng As Range
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set shtCurrent = ThisWorkbook.Sheets("Cycle Summary")
Set shtFY = ThisWorkbook.Sheets("FY12 D1")
Set CopyRng = shtCurrent.Range("$C$12:$C$47")
LastCol = shtFY.Cells("5", Columns.Count).End(xlToLeft).Column + 1
With CopyRng
shtFY.Cells("5", LastCol).Resize(.Rows.Count, .Columns.Count).Value = .Value
End With
shtFY.Cells("4", LastCol).Value = shtCurrent.Range("I3").Value
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
感謝您的建議和指導!
和問題? – smirkingman 2012-03-09 13:26:32
認真嗎?當信息進入新頁面時,它也沒有邊界...我需要添加邊框,但我無法獲得正確的線條來完成此操作。 – Jon 2012-03-09 13:47:59