Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Macro works in 2003, not in '97

Sorry, no title on previous one............

Hi All..........

I recorded this macro in XL03 and it works fine, in mine, and another 03,
but crashes in two different XL97's on the line starting with
"Selection".........yet other macros in the same book work ok on those
97's.......


Sub SortByWorkorder()

Range("A13").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=Range("D14"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("a14").Select
Range("D11").Select
End Sub

any advice will be appreciated.........

Vaya con Dios,
Chuck, CABGx3


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Macro works in 2003, not in '97

DataOption1 was introduced after Excel 97. Your code will probably work
okay if you get rid of it.

When you're developing for cross-version use, it's best to work in the
lowest version.

--
Jim Rech
Excel MVP

"CLR" wrote in message
...
| Sorry, no title on previous one............
|
| Hi All..........
|
| I recorded this macro in XL03 and it works fine, in mine, and another 03,
| but crashes in two different XL97's on the line starting with
| "Selection".........yet other macros in the same book work ok on those
| 97's.......
|
|
| Sub SortByWorkorder()
|
| Range("A13").Select
| Range(Selection, Selection.End(xlToRight)).Select
| Range(Selection, Selection.End(xlDown)).Select
| Selection.Sort Key1:=Range("D14"), Order1:=xlAscending,
Header:=xlGuess,
| _
| OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
| DataOption1:=xlSortNormal
| Range("a14").Select
| Range("D11").Select
| End Sub
|
| any advice will be appreciated.........
|
| Vaya con Dios,
| Chuck, CABGx3
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default Macro works in 2003, not in '97

Thanks Jim.............but I have no clue as to what "Data Option 1" is,
nor how to get rid of it. Would you be so kind as to elaborate?............

I agree about the developing in the enduser's version, however the company I
work for will only provide one version per user. And, there are four users
of this file, two with 2003 and two with 97.


Thanks again,
Vaya con Dios,
Chuck, CABGx3




"Jim Rech" wrote in message
...
DataOption1 was introduced after Excel 97. Your code will probably work
okay if you get rid of it.

When you're developing for cross-version use, it's best to work in the
lowest version.

--
Jim Rech
Excel MVP

"CLR" wrote in message
...
| Sorry, no title on previous one............
|
| Hi All..........
|
| I recorded this macro in XL03 and it works fine, in mine, and another

03,
| but crashes in two different XL97's on the line starting with
| "Selection".........yet other macros in the same book work ok on those
| 97's.......
|
|
| Sub SortByWorkorder()
|
| Range("A13").Select
| Range(Selection, Selection.End(xlToRight)).Select
| Range(Selection, Selection.End(xlDown)).Select
| Selection.Sort Key1:=Range("D14"), Order1:=xlAscending,
Header:=xlGuess,
| _
| OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
| DataOption1:=xlSortNormal
| Range("a14").Select
| Range("D11").Select
| End Sub
|
| any advice will be appreciated.........
|
| Vaya con Dios,
| Chuck, CABGx3
|
|




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Macro works in 2003, not in '97

Just delete it from your code. The line will then read:

Selection.Sort Key1:=Range("D14"), Order1:=xlAscending, Header:=xlGuess,_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

--
Jim Rech
Excel MVP
"CLR" wrote in message
...
| Thanks Jim.............but I have no clue as to what "Data Option 1" is,
| nor how to get rid of it. Would you be so kind as to
elaborate?............
|
| I agree about the developing in the enduser's version, however the company
I
| work for will only provide one version per user. And, there are four
users
| of this file, two with 2003 and two with 97.
|
|
| Thanks again,
| Vaya con Dios,
| Chuck, CABGx3
|
|
|
|
| "Jim Rech" wrote in message
| ...
| DataOption1 was introduced after Excel 97. Your code will probably work
| okay if you get rid of it.
|
| When you're developing for cross-version use, it's best to work in the
| lowest version.
|
| --
| Jim Rech
| Excel MVP
|
| "CLR" wrote in message
| ...
| | Sorry, no title on previous one............
| |
| | Hi All..........
| |
| | I recorded this macro in XL03 and it works fine, in mine, and another
| 03,
| | but crashes in two different XL97's on the line starting with
| | "Selection".........yet other macros in the same book work ok on those
| | 97's.......
| |
| |
| | Sub SortByWorkorder()
| |
| | Range("A13").Select
| | Range(Selection, Selection.End(xlToRight)).Select
| | Range(Selection, Selection.End(xlDown)).Select
| | Selection.Sort Key1:=Range("D14"), Order1:=xlAscending,
| Header:=xlGuess,
| | _
| | OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
| | DataOption1:=xlSortNormal
| | Range("a14").Select
| | Range("D11").Select
| | End Sub
| |
| | any advice will be appreciated.........
| |
| | Vaya con Dios,
| | Chuck, CABGx3
| |
| |
|
|
|
|


  #5   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default Macro works in 2003, not in '97

OIC.........duh, .......I thought you were talking about something else
<blush..........I'll give it a try in the morning at work as I don't have
'97 here at home........

Thanks again,
Vaya con Dios,
Chuck, CABGx3


"Jim Rech" wrote in message
...
Just delete it from your code. The line will then read:

Selection.Sort Key1:=Range("D14"), Order1:=xlAscending, Header:=xlGuess,_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

--
Jim Rech
Excel MVP
"CLR" wrote in message
...
| Thanks Jim.............but I have no clue as to what "Data Option 1"

is,
| nor how to get rid of it. Would you be so kind as to
elaborate?............
|
| I agree about the developing in the enduser's version, however the

company
I
| work for will only provide one version per user. And, there are four
users
| of this file, two with 2003 and two with 97.
|
|
| Thanks again,
| Vaya con Dios,
| Chuck, CABGx3
|
|
|
|
| "Jim Rech" wrote in message
| ...
| DataOption1 was introduced after Excel 97. Your code will probably

work
| okay if you get rid of it.
|
| When you're developing for cross-version use, it's best to work in the
| lowest version.
|
| --
| Jim Rech
| Excel MVP
|
| "CLR" wrote in message
| ...
| | Sorry, no title on previous one............
| |
| | Hi All..........
| |
| | I recorded this macro in XL03 and it works fine, in mine, and

another
| 03,
| | but crashes in two different XL97's on the line starting with
| | "Selection".........yet other macros in the same book work ok on

those
| | 97's.......
| |
| |
| | Sub SortByWorkorder()
| |
| | Range("A13").Select
| | Range(Selection, Selection.End(xlToRight)).Select
| | Range(Selection, Selection.End(xlDown)).Select
| | Selection.Sort Key1:=Range("D14"), Order1:=xlAscending,
| Header:=xlGuess,
| | _
| | OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,

_
| | DataOption1:=xlSortNormal
| | Range("a14").Select
| | Range("D11").Select
| | End Sub
| |
| | any advice will be appreciated.........
| |
| | Vaya con Dios,
| | Chuck, CABGx3
| |
| |
|
|
|
|






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Macro works in 2003, not in '97

Thanks again Jim.........I made your recommended change this morning and it
works "finer than frog hair"........

Vaya con Dios,
Chuck, CABGx3




"Jim Rech" wrote in message
...
Just delete it from your code. The line will then read:

Selection.Sort Key1:=Range("D14"), Order1:=xlAscending, Header:=xlGuess,_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

--
Jim Rech
Excel MVP
"CLR" wrote in message
...
| Thanks Jim.............but I have no clue as to what "Data Option 1"

is,
| nor how to get rid of it. Would you be so kind as to
elaborate?............
|
| I agree about the developing in the enduser's version, however the

company
I
| work for will only provide one version per user. And, there are four
users
| of this file, two with 2003 and two with 97.
|
|
| Thanks again,
| Vaya con Dios,
| Chuck, CABGx3
|
|
|
|
| "Jim Rech" wrote in message
| ...
| DataOption1 was introduced after Excel 97. Your code will probably

work
| okay if you get rid of it.
|
| When you're developing for cross-version use, it's best to work in the
| lowest version.
|
| --
| Jim Rech
| Excel MVP
|
| "CLR" wrote in message
| ...
| | Sorry, no title on previous one............
| |
| | Hi All..........
| |
| | I recorded this macro in XL03 and it works fine, in mine, and

another
| 03,
| | but crashes in two different XL97's on the line starting with
| | "Selection".........yet other macros in the same book work ok on

those
| | 97's.......
| |
| |
| | Sub SortByWorkorder()
| |
| | Range("A13").Select
| | Range(Selection, Selection.End(xlToRight)).Select
| | Range(Selection, Selection.End(xlDown)).Select
| | Selection.Sort Key1:=Range("D14"), Order1:=xlAscending,
| Header:=xlGuess,
| | _
| | OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,

_
| | DataOption1:=xlSortNormal
| | Range("a14").Select
| | Range("D11").Select
| | End Sub
| |
| | any advice will be appreciated.........
| |
| | Vaya con Dios,
| | Chuck, CABGx3
| |
| |
|
|
|
|




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
VBA errors in 2007 (works fine in 2003) Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 14 September 6th 09 12:46 PM
Works in 2007 but not 2003 teepee[_3_] Excel Discussion (Misc queries) 9 November 25th 08 08:53 AM
Any ideas why a reference that works will in 2003 has problems in george Excel Worksheet Functions 4 July 21st 08 02:21 AM
Spreadsheet SUM(C:C) or indeed any SUM no longer works Excel 2003 knowq.biz/video.htm Excel Worksheet Functions 14 November 13th 06 03:19 PM
Works 4.0(wks) needs to be converted to Excel 2003 BJB Excel Discussion (Misc queries) 2 July 15th 05 03:49 PM


All times are GMT +1. The time now is 06:06 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"