Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA project created in Excel 2003 doesn't run in Excel 2000
Here is my code, it works perfectly in Excel 2003
Private Sub Commandbutton1_Click() If (Range("S9") = 0) Then 'Unprotect Form 99 Sheets("Form-99").Select ActiveSheet.Unprotect 5121 'Copy Signature Sheets("Data Entry").Select ActiveSheet.Unprotect 5121 Worksheets("Data Entry").Range("N3").Copy 'Paste into Form 99 Sheets("Form-99").Select ActiveSheet.Range("Q8").Select ActiveSheet.Paste ActiveSheet.Shapes("Signature").Select Selection.Name = "SignatureQ8" 'Protect Form 99 Application.CutCopyMode = False Selection.Locked = True ActiveSheet.Protect 5121, DrawingObjects:=True, Contents:=True, Scenarios:=True 'Update Data Entry & Protect Sheets("Data Entry").Select ActiveSheet.Protect 5121, DrawingObjects:=True, Contents:=True, Scenarios:=True Worksheets("Data Entry").Range("S9") = 1: Range("T9") = "Signed!" End If End Sub On machines running Excel 2000 I get an error "Run time error 1004" "The cell or chart you are trying to change is protected and therefore read only" From the code I am unprotecting, doing my work and protecting again. It works fine in 2003, any sugestions on what is happening with 2000? I even tried saving the file in an earlier version of Excell but this didn't help. -- Rick |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA project created in Excel 2003 doesn't run in Excel 2000
Rick,
The password should be a String not a numeric value. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Rick_T" wrote in message ... Here is my code, it works perfectly in Excel 2003 Private Sub Commandbutton1_Click() If (Range("S9") = 0) Then 'Unprotect Form 99 Sheets("Form-99").Select ActiveSheet.Unprotect 5121 'Copy Signature Sheets("Data Entry").Select ActiveSheet.Unprotect 5121 Worksheets("Data Entry").Range("N3").Copy 'Paste into Form 99 Sheets("Form-99").Select ActiveSheet.Range("Q8").Select ActiveSheet.Paste ActiveSheet.Shapes("Signature").Select Selection.Name = "SignatureQ8" 'Protect Form 99 Application.CutCopyMode = False Selection.Locked = True ActiveSheet.Protect 5121, DrawingObjects:=True, Contents:=True, Scenarios:=True 'Update Data Entry & Protect Sheets("Data Entry").Select ActiveSheet.Protect 5121, DrawingObjects:=True, Contents:=True, Scenarios:=True Worksheets("Data Entry").Range("S9") = 1: Range("T9") = "Signed!" End If End Sub On machines running Excel 2000 I get an error "Run time error 1004" "The cell or chart you are trying to change is protected and therefore read only" From the code I am unprotecting, doing my work and protecting again. It works fine in 2003, any sugestions on what is happening with 2000? I even tried saving the file in an earlier version of Excell but this didn't help. -- Rick |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA project created in Excel 2003 doesn't run in Excel 2000
By a string you mean for example aabb? I tried this and received an error.
-- Rick "Jim Cone" wrote: Rick, The password should be a String not a numeric value. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Rick_T" wrote in message ... Here is my code, it works perfectly in Excel 2003 Private Sub Commandbutton1_Click() If (Range("S9") = 0) Then 'Unprotect Form 99 Sheets("Form-99").Select ActiveSheet.Unprotect 5121 'Copy Signature Sheets("Data Entry").Select ActiveSheet.Unprotect 5121 Worksheets("Data Entry").Range("N3").Copy 'Paste into Form 99 Sheets("Form-99").Select ActiveSheet.Range("Q8").Select ActiveSheet.Paste ActiveSheet.Shapes("Signature").Select Selection.Name = "SignatureQ8" 'Protect Form 99 Application.CutCopyMode = False Selection.Locked = True ActiveSheet.Protect 5121, DrawingObjects:=True, Contents:=True, Scenarios:=True 'Update Data Entry & Protect Sheets("Data Entry").Select ActiveSheet.Protect 5121, DrawingObjects:=True, Contents:=True, Scenarios:=True Worksheets("Data Entry").Range("S9") = 1: Range("T9") = "Signed!" End If End Sub On machines running Excel 2000 I get an error "Run time error 1004" "The cell or chart you are trying to change is protected and therefore read only" From the code I am unprotecting, doing my work and protecting again. It works fine in 2003, any sugestions on what is happening with 2000? I even tried saving the file in an earlier version of Excell but this didn't help. -- Rick |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA project created in Excel 2003 doesn't run in Excel 2000
Rick,
Enclose the password within quote marks... "5121" or "aabb" -or- A String variable would work... Dim Mush as String Mush = "LotsOfLuck" ActiveSheet.Unprotect Mush -- Jim Cone San Francisco, USA http://www.officeletter.com/blink/specialsort.html "Rick_T" wrote in message By a string you mean for example aabb? I tried this and received an error. -- Rick "Jim Cone" wrote: Rick, The password should be a String not a numeric value. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Change in Link Behavior - Excel 2000 to 2003 | Links and Linking in Excel | |||
Migrating from Excel 2000 to Excel 2003 | Excel Discussion (Misc queries) | |||
Excel 2000 and Excel 2003 | Excel Discussion (Misc queries) | |||
Excel Re-calculation 2000 compared to 2003 | Excel Discussion (Misc queries) |