Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi;
I wasn't sure which was more appropriate -- continue with the older thread or start a new one? So, I am starting a new one. If this is contrary to netequite et me know. My friend has Excel version 9.0 . I have version 10. The correct version numbers on both machines are being returned. (In the VBE Immediate window and through MsgBox.). The only way that I can test this problem is directly on his machine. I have the following in my startup code: If Val(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. If I use 11 as a test for example the implementation jumps to the 'Else' condition as it should. His keeps giving an error at compile time; 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 at the ' AllowFormattingCells:=True, _' line. I didn't write down his exact error message but it was something like "argument not found". I have tried (in my amateur way) to use compiler directives and that hasn't worked. I have both programs working by taking the additional 'Protect' code out of both versions, but other people I will be sharing with will have version 10 and the additional 'Protect' code is a nice feature for what I want to do. Any and all suggestions gratefully received. Regards Bill |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Office application version does not match. | Excel Discussion (Misc queries) | |||
Application.VBE.Version on Excel XP | Excel Programming | |||
Conditional Compilation using Application.Version | Excel Programming | |||
Conditional Compilation using Application.Version | Excel Programming | |||
Help in using Application.Version | Excel Programming |