A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

2003 Macro in a 2007 World



 
 
Thread Tools Display Modes
  #1  
Old November 19th, 2009, 05:33 PM posted to microsoft.public.excel.misc
hnyb1
external usenet poster
 
Posts: 27
Default 2003 Macro in a 2007 World

My company, in its infinite wisdom, has decided to upgrade some users to
Microsoft 2007 while leaving the rest of us in 2003. I set up a spreadsheet
with macro in Excel 2003. A user has updated data in the spreadsheet using
Excel 2007. He has then sent the spreadsheet to another user who is
attempting to run the macro in Excel 2003. Macro bombs out with the message
"Run-Time error '57121': Application-defined or object-defined error". Code
is as follows:

Sub Spell()
'
' Spell Macro
' Macro to allow spell checking of password protected Excel Forms
'
' Keyboard Shortcut: Ctrl+s
'
ActiveSheet.Unprotect Password:="password"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="password"
Range("A1:I1").Select
End Sub

Any help would be greatly appreciated.

Thanks,
Holly
  #2  
Old November 20th, 2009, 05:56 PM posted to microsoft.public.excel.misc
Jon Peltier[_2_]
external usenet poster
 
Posts: 386
Default 2003 Macro in a 2007 World

The code works for me in 2003. Is the password correct? Is the active
sheet a chart?

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/



hnyb1 wrote:
My company, in its infinite wisdom, has decided to upgrade some users to
Microsoft 2007 while leaving the rest of us in 2003. I set up a spreadsheet
with macro in Excel 2003. A user has updated data in the spreadsheet using
Excel 2007. He has then sent the spreadsheet to another user who is
attempting to run the macro in Excel 2003. Macro bombs out with the message
"Run-Time error '57121': Application-defined or object-defined error". Code
is as follows:

Sub Spell()
'
' Spell Macro
' Macro to allow spell checking of password protected Excel Forms
'
' Keyboard Shortcut: Ctrl+s
'
ActiveSheet.Unprotect Password:="password"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="password"
Range("A1:I1").Select
End Sub

Any help would be greatly appreciated.

Thanks,
Holly

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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