Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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?"


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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?"




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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?"


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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?"




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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?"




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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?"


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default 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


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 2007 versus Excel 2003 & Excel 97-2003 fully compatible Bumpersnesty Excel Worksheet Functions 0 April 26th 10 09:44 PM
Excel 2003 help doesn't work. I got both Excel 2003 and 2007 insta Kenneth Andersen Excel Discussion (Misc queries) 0 February 16th 10 10:44 AM
Excel 2000 and Excel 2003 in Office 2003 Emon New Users to Excel 0 December 21st 06 09:11 AM
Upgrade from Excel 2000 to Excel 2003 without MS Office 2003? brigida3 Excel Discussion (Misc queries) 1 January 22nd 06 05:13 PM
Excel 2003 crashes loading excel files created Excel 2000 Jeff Lewin Australia Excel Discussion (Misc queries) 0 June 27th 05 04:20 AM


All times are GMT +1. The time now is 11:56 PM.

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

About Us

"It's about Microsoft Excel"