ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel 97 vs. Excel 2003 (https://www.excelbanter.com/excel-programming/296163-excel-97-vs-excel-2003-a.html)

Syed Zeeshan Haider[_5_]

Excel 97 vs. Excel 2003
 
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?"



Chip Pearson

Excel 97 vs. Excel 2003
 
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?"





Syed Zeeshan Haider[_5_]

Excel 97 vs. Excel 2003
 
"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?"



Chip Pearson

Excel 97 vs. Excel 2003
 
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?"





Syed Zeeshan Haider[_5_]

Excel 97 vs. Excel 2003
 
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?"



Robert McCurdy

Excel 97 vs. Excel 2003
 
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



Syed Zeeshan Haider[_5_]

Excel 97 vs. Excel 2003
 
"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?"




All times are GMT +1. The time now is 03:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com