Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Office 2000 vs 2003

I have some code that I created using Excel 2003 but when user's who have
2000 try to run it they get some errors. Here is a sample of the code they's
choking:

Columns("A:F").Select
Selection.Replace What:=" ", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

I was thinking it had something to do with the x1 part of the code but I'm
not sure. I'm not a programmer I just wrote this by recoding my tasks in a
macro and tying eveyrthing together. If there is an issue with code between
office versions is there a more standard format for me to use?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Office 2000 vs 2003

Columns("A:F").Select
Selection.Replace What:=" ", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False

Should be sufficient. The ability to replace formats was addin in xl2003 as
I recall, so it isn't understood by xl2000 (the replace function didn't
have those arguments). Not using those arguments in xl2003 will not cause a
problem since you are not replacing by format.

--
Regards,
Tom Ogilvy

"hshayh0rn" wrote in message
...
I have some code that I created using Excel 2003 but when user's who have
2000 try to run it they get some errors. Here is a sample of the code

they's
choking:

Columns("A:F").Select
Selection.Replace What:=" ", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

I was thinking it had something to do with the x1 part of the code but I'm
not sure. I'm not a programmer I just wrote this by recoding my tasks in a
macro and tying eveyrthing together. If there is an issue with code

between
office versions is there a more standard format for me to use?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Office 2000 vs 2003

In Excel 2000 the .Replace method does not have an option for SearchFormat or
ReplaceFormat. Try taking those out of the code:
Columns("A:F").Select
Selection.Replace What:=" ", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False

If you will be working with both Excel versions, record your macros on the
earlier one - most of the earlier code will work in later versions, while any
new features in 2003 will bomb on 2000. Either that or you will have to
learn how to dig into VBA code and objects!
--
- K Dales


"hshayh0rn" wrote:

I have some code that I created using Excel 2003 but when user's who have
2000 try to run it they get some errors. Here is a sample of the code they's
choking:

Columns("A:F").Select
Selection.Replace What:=" ", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

I was thinking it had something to do with the x1 part of the code but I'm
not sure. I'm not a programmer I just wrote this by recoding my tasks in a
macro and tying eveyrthing together. If there is an issue with code between
office versions is there a more standard format for me to use?

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
Can I run setup Office 2003 for office 2000 installed? FramB100 Excel Worksheet Functions 1 July 16th 06 09:34 PM
Working with Office 2000 and Office 2003 - Urgent Suketu Excel Discussion (Misc queries) 0 April 20th 06 04:59 PM
Office 2000/Office 2003 Excel not printing landscape vise versa BAHTTEXT in English text Setting up and Configuration of Excel 1 April 17th 06 01:37 PM
comile error for sheet in office 2000 but not office 2003?? Bob Aylward[_2_] Excel Programming 1 December 13th 05 07:36 PM
HOW CAN I READ SPREADSHEETS CREATED BY OFFICE 2000 ON OFFICE 2003. BOLOMO3 Excel Worksheet Functions 1 March 31st 05 01:40 AM


All times are GMT +1. The time now is 07:59 AM.

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"