在 PERSONAL.XLSB 工作簿中,我有以下代码:
Public Sub Password(ByVal Target As Range)
a = ""
For n = 1 To Len(Target)
a = a & "*"
Next n
Target.NumberFormat = """" & a & """;""" & a & """;""" & a & """;""" & a & """"
End Sub
在我的新工作簿中,我有以下代码:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Info.Range("AA9").Address Then
Workbooks("PERSONAL.XLSB").Password Target
End If
End Sub
我一直收到一个错误说,Compile error: Invalid use of property