B
Bill Case
Hi;
My friend has Excel version 9.0 (from Application.Version in a MsgBox). I
have version 10.
I have the following in my startup code:
If Application.Version >= "10" Then
MembSheet.Protect _
Password:="bill", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=False, _
AllowFormattingRows:=False, _
AllowInsertingColumns:=False, _
AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=False, _
AllowDeletingRows:=True, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True
Else
MembSheet.Protect _
Password:="bill", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True
End If
It works perfectly on my version 10 machine. His keeps giving an error; the
debugger shows that his machine is not making the jump over the 'Then'
statement to the 'Else' and his error always comes about when his compiler
tries to read the version 10 Protect block (I know the commands are different
in the two versions). I have googled and searched this list. I can find no
hints. The only thing I haven't tried is 'Val(Application.Version) >= 10 but
that shouldn't be necessary, should it?
I am baffled.
Regards Bill
My friend has Excel version 9.0 (from Application.Version in a MsgBox). I
have version 10.
I have the following in my startup code:
If Application.Version >= "10" Then
MembSheet.Protect _
Password:="bill", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=False, _
AllowFormattingRows:=False, _
AllowInsertingColumns:=False, _
AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=False, _
AllowDeletingRows:=True, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True
Else
MembSheet.Protect _
Password:="bill", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True
End If
It works perfectly on my version 10 machine. His keeps giving an error; the
debugger shows that his machine is not making the jump over the 'Then'
statement to the 'Else' and his error always comes about when his compiler
tries to read the version 10 Protect block (I know the commands are different
in the two versions). I have googled and searched this list. I can find no
hints. The only thing I haven't tried is 'Val(Application.Version) >= 10 but
that shouldn't be necessary, should it?
I am baffled.
Regards Bill