Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Change in Link Behavior - Excel 2000 to 2003 David G. Hoch Links and Linking in Excel 0 April 27th 06 04:41 AM
Migrating from Excel 2000 to Excel 2003 Rene H Excel Discussion (Misc queries) 1 November 24th 05 03:48 PM
Excel 2000 and Excel 2003 Silfredo Excel Discussion (Misc queries) 0 August 9th 05 06:36 PM
Excel Re-calculation 2000 compared to 2003 tonymitchell Excel Discussion (Misc queries) 1 August 3rd 05 04:22 PM


All times are GMT +1. The time now is 10:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"