Sub CopyPaste()
Dim xA As Range, xB As Workbook, xS As Worksheet, Chk%
Set xA = ActiveSheet.UsedRange
Application.ScreenUpdating = False
Set xB = Workbooks.Open(ThisWorkbook.Path & "\bcca.xls", Password:="1234")
For Each xS In xB.Sheets
If Left(xS.Name, 6) = "w_PRG_" Then Chk = 1: Exit For
Next
If Chk = 0 Then MsgBox "¤u§@ªí¡ew_PRG¡f¤£¦s¦b¡I¡@": Exit Sub
With xS
.Unprotect "pass"
.UsedRange.Clear
xA.Copy .[A1]
.UsedRange.Font.Color = vbWhite
.Name = "w_PRG_" & Format(Date, "yyyymmdd")
.Protect "pass"
End With
xB.Close 1
MsgBox "½Æ»s§¹¦¨¡I¡@"
End Sub
Sub ex()
Set D = CreateObject("scripting.dictionary")
D.CompareMode = 1 '¦r¨å¤£°Ï¤À¤j¤p¼g
D("abc") = 22
D("ABC") = 55
MsgBox D("abc") & "," & D("ABC")
End Sub