비밀번호가있는 시트가 있습니다. 내가 VBA와 그 시트에 아무것도 변경할 때 나는이 같은 보호를 해제 :비보호 시트를 수정할 수 없습니다.
For j = 13 To 12 + numberofsomething
With Range("H" & j & ":L" & j).Borders
.LineStyle = xlContinuous '<---Here
.Weight = xlMedium
.Color = RGB(255, 0, 0)
End With
Next j
Run-time error: 1004 Unable to set the LineStyle proprety of the Borders class
문제가 될 수 무엇 :
Private Sub Worksheet_Change(ByVal target As Range)
ActiveSheet.Unprotect Password:="pass"
'do stuffs
ActiveSheet.Protect Password:="pass"
End Sub
문제는 아직도이 줄을이 오류 메시지가 있다는 것입니다 ?
두 번째 코드 블록이 어떻게 실행되고 있는지 보여 주시겠습니까? 내가 복사 – Gareth
블록 코드처럼, IF 문에 있습니다 만약 target.Address = "$의 H $ 5"그리고 ..... 끝 그게 모든 – PyVas
는 경우'Worksheet_Change' 절차에 ? – Gareth