Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Experts,
A friend of mine, who is not a fond of programming, has given me a certain task for research purposes. I have to accomplish this task in Excel with the help of its VBA. I have Excel 97 Pro on Win 98 while my friend has Excel 2003 Pro on WinXP 2003 Pro SP1. I have developed some huge and complex code on my PC. When I took this code to my friends PC, and ran it, first of all it gave me an error on the last part of following line: For Each cCell in [A3:A2000] The error said "Object required". When I replaced [A3:A2000] with Range("A3:A2000"), the code began to work. How come a piece of code which works in Excel 97 Pro does not work in Excel 2003 Pro? Are there any other conflicts like this one? Where can I find them? URL etc.? Thank you, -- Syed Zeeshan Haider. http://szh.20m.com/ http://gomusharrafgo.20m.com/ ----------------------------------- Allah says to Mankind: "Then which of the favours of your Lord will ye deny?" |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Syed,
I can't replicate the error in Excel 2003. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Syed Zeeshan Haider" wrote in message ... Hello Experts, A friend of mine, who is not a fond of programming, has given me a certain task for research purposes. I have to accomplish this task in Excel with the help of its VBA. I have Excel 97 Pro on Win 98 while my friend has Excel 2003 Pro on WinXP 2003 Pro SP1. I have developed some huge and complex code on my PC. When I took this code to my friends PC, and ran it, first of all it gave me an error on the last part of following line: For Each cCell in [A3:A2000] The error said "Object required". When I replaced [A3:A2000] with Range("A3:A2000"), the code began to work. How come a piece of code which works in Excel 97 Pro does not work in Excel 2003 Pro? Are there any other conflicts like this one? Where can I find them? URL etc.? Thank you, -- Syed Zeeshan Haider. http://szh.20m.com/ http://gomusharrafgo.20m.com/ ----------------------------------- Allah says to Mankind: "Then which of the favours of your Lord will ye deny?" |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Chip Pearson" wrote in message
... Syed, I can't replicate the error in Excel 2003. So, what should be the problem with my friend's copy of Excel 2003? Are there any changes in VBA of Excel 2003, that should be taken care of by the coders with Excel 97? Thank you, -- Syed Zeeshan Haider. http://szh.20m.com/ http://gomusharrafgo.20m.com/ ----------------------------------- Allah says to Mankind: "Then which of the favours of your Lord will ye deny?" |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
VBA took a version upgrade (v5 to v6) in Excel 2000, and remains
the same in all later releases of Excel. I don't know why your friend's copy of Excel 2003 is causing this error. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Syed Zeeshan Haider" wrote in message ... "Chip Pearson" wrote in message ... Syed, I can't replicate the error in Excel 2003. So, what should be the problem with my friend's copy of Excel 2003? Are there any changes in VBA of Excel 2003, that should be taken care of by the coders with Excel 97? Thank you, -- Syed Zeeshan Haider. http://szh.20m.com/ http://gomusharrafgo.20m.com/ ----------------------------------- Allah says to Mankind: "Then which of the favours of your Lord will ye deny?" |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chip Pearson" wrote in message ...
VBA took a version upgrade (v5 to v6) in Excel 2000, and remains the same in all later releases of Excel. I don't know why your friend's copy of Excel 2003 is causing this error. Thanks, Chip! I'll be hopefully posting more questions after having a go-through my code on my friend's PC. Thanks again! -- Syed Zeeshan Haider. http://szh.20m.com/ http://gomusharrafgo.20m.com/ ----------------------------------- Allah says to Mankind: "Then which of the favours of your Lord will ye deny?" |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Chip Pearson" wrote in message
... VBA took a version upgrade (v5 to v6) in Excel 2000, and remains the same in all later releases of Excel. I don't know why your friend's copy of Excel 2003 is causing this error. Hi Chip, I have figured out the problem with my friend's PC. I had a reference to an ActiveX control in my project which was not available in my friend's PC. As debuggers are complained about, the debugger of VBA took us to a wrong line. This time it took us to Chr$ method. Thank you, -- Syed Zeeshan Haider. http://szh.20m.com/ http://gomusharrafgo.20m.com/ ----------------------------------- Allah says to Mankind: "Then which of the favours of your Lord will ye deny?" |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does this work Syed?
Dim cCell As Range For Each cCell In [Sheet2!A3:A7].Cells cCell.Interior.ColorIndex = Int(Rnd() * 55 + 2) Next cCell Regards Robert "Syed Zeeshan Haider" wrote in message ... Hello Experts, A friend of mine, who is not a fond of programming, has given me a certain task for research purposes. I have to accomplish this task in Excel with the help of its VBA. I have Excel 97 Pro on Win 98 while my friend has Excel 2003 Pro on WinXP 2003 Pro SP1. I have developed some huge and complex code on my PC. When I took this code to my friends PC, and ran it, first of all it gave me an error on the last part of following line: For Each cCell in [A3:A2000] The error said "Object required". When I replaced [A3:A2000] with Range("A3:A2000"), the code began to work. How come a piece of code which works in Excel 97 Pro does not work in Excel 2003 Pro? Are there any other conflicts like this one? Where can I find them? URL etc.? Thank you, -- Syed Zeeshan Haider. http://szh.20m.com/ http://gomusharrafgo.20m.com/ ----------------------------------- Allah says to Mankind: "Then which of the favours of your Lord will ye deny?" <bg RR "The better the chilli the stinkeyer the fart - why O'Lord? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.659 / Virus Database: 423 - Release Date: 16/04/2004 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 versus Excel 2003 & Excel 97-2003 fully compatible | Excel Worksheet Functions | |||
Excel 2003 help doesn't work. I got both Excel 2003 and 2007 insta | Excel Discussion (Misc queries) | |||
Excel 2000 and Excel 2003 in Office 2003 | New Users to Excel | |||
Upgrade from Excel 2000 to Excel 2003 without MS Office 2003? | Excel Discussion (Misc queries) | |||
Excel 2003 crashes loading excel files created Excel 2000 | Excel Discussion (Misc queries) |