#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default Sorting

hi,
I've a macro for sorting a selected range in a worksheet.the workbook is
shared.the problem is when I sort it in my file, the macro works well but for
the other users the range is not sorted?!

Sub Rectangle1954_Click()
Dim myRng As Range
Set myRng = Selection.Areas(1)
With myRng

.Sort key1:=Columns("C"), order1:=xlAscending, DataOption1:=xlSortNormal,_
key2:=Columns("B"), order2:=xlAscending, DataOption2:=xlSortTextAsNumbers,_
Key3:=Columns("F"), order3:=xlAscending, DataOption3:=xlSortNormal

End With
End Sub
any help?
thank you for your time.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default Sorting


It could be that they are not selecting a range with column C in it.
Try adding a dot "." ahead of all three column designations.
That way the sort will take place relative to the selection.
Column C will then be the third column of the selection (not the worksheet).
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"peyman"
wrote in message
hi,
I've a macro for sorting a selected range in a worksheet.the workbook is
shared.the problem is when I sort it in my file, the macro works well but for
the other users the range is not sorted?!

Sub Rectangle1954_Click()
Dim myRng As Range
Set myRng = Selection.Areas(1)
With myRng

.Sort key1:=Columns("C"), order1:=xlAscending, DataOption1:=xlSortNormal,_
key2:=Columns("B"), order2:=xlAscending, DataOption2:=xlSortTextAsNumbers,_
Key3:=Columns("F"), order3:=xlAscending, DataOption3:=xlSortNormal

End With
End Sub
any help?
thank you for your time.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default Sorting

Jim,
they don't need to select any range.I do select the range then sort and
save.when the other users save,they should see all my changes?right?

"Jim Cone" wrote:


It could be that they are not selecting a range with column C in it.
Try adding a dot "." ahead of all three column designations.
That way the sort will take place relative to the selection.
Column C will then be the third column of the selection (not the worksheet).
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"peyman"
wrote in message
hi,
I've a macro for sorting a selected range in a worksheet.the workbook is
shared.the problem is when I sort it in my file, the macro works well but for
the other users the range is not sorted?!

Sub Rectangle1954_Click()
Dim myRng As Range
Set myRng = Selection.Areas(1)
With myRng

.Sort key1:=Columns("C"), order1:=xlAscending, DataOption1:=xlSortNormal,_
key2:=Columns("B"), order2:=xlAscending, DataOption2:=xlSortTextAsNumbers,_
Key3:=Columns("F"), order3:=xlAscending, DataOption3:=xlSortNormal

End With
End Sub
any help?
thank you for your time.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default Sorting


Sorry, I missed the "shared" part. I have no experience with shared workbooks.
So I don't know what will or won't happen.
There are an amazing number of limitations with shared workbooks. See...
"Features that are unavailable in shared workbooks" in help.

My advice still applies, however, no matter the type of workbook.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"peyman"
wrote in message
Jim,
they don't need to select any range.I do select the range then sort and
save.when the other users save,they should see all my changes?right?



"Jim Cone" wrote:
It could be that they are not selecting a range with column C in it.
Try adding a dot "." ahead of all three column designations.
That way the sort will take place relative to the selection.
Column C will then be the third column of the selection (not the worksheet).
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"peyman"
wrote in message
hi,
I've a macro for sorting a selected range in a worksheet.the workbook is
shared.the problem is when I sort it in my file, the macro works well but for
the other users the range is not sorted?!

Sub Rectangle1954_Click()
Dim myRng As Range
Set myRng = Selection.Areas(1)
With myRng

.Sort key1:=Columns("C"), order1:=xlAscending, DataOption1:=xlSortNormal,_
key2:=Columns("B"), order2:=xlAscending, DataOption2:=xlSortTextAsNumbers,_
Key3:=Columns("F"), order3:=xlAscending, DataOption3:=xlSortNormal

End With
End Sub
any help?
thank you for your time.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default Sorting

THANX JIM.I APPLIED YOUR ADVICE.BUT I HAVE STILL THE SAME PROBLEM.

"Jim Cone" wrote:


Sorry, I missed the "shared" part. I have no experience with shared workbooks.
So I don't know what will or won't happen.
There are an amazing number of limitations with shared workbooks. See...
"Features that are unavailable in shared workbooks" in help.

My advice still applies, however, no matter the type of workbook.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"peyman"
wrote in message
Jim,
they don't need to select any range.I do select the range then sort and
save.when the other users save,they should see all my changes?right?



"Jim Cone" wrote:
It could be that they are not selecting a range with column C in it.
Try adding a dot "." ahead of all three column designations.
That way the sort will take place relative to the selection.
Column C will then be the third column of the selection (not the worksheet).
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"peyman"
wrote in message
hi,
I've a macro for sorting a selected range in a worksheet.the workbook is
shared.the problem is when I sort it in my file, the macro works well but for
the other users the range is not sorted?!

Sub Rectangle1954_Click()
Dim myRng As Range
Set myRng = Selection.Areas(1)
With myRng

.Sort key1:=Columns("C"), order1:=xlAscending, DataOption1:=xlSortNormal,_
key2:=Columns("B"), order2:=xlAscending, DataOption2:=xlSortTextAsNumbers,_
Key3:=Columns("F"), order3:=xlAscending, DataOption3:=xlSortNormal

End With
End Sub
any help?
thank you for your time.



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
Sorting VLookup vs Sorting SumProduct Lauren Excel Discussion (Misc queries) 1 August 21st 07 12:19 AM
Sorting T. Jenkins Excel Discussion (Misc queries) 3 August 18th 07 01:54 AM
Sorting Bill Excel Worksheet Functions 2 November 14th 06 06:10 PM
Sorting: Sorting by the First Character dzuy Excel Discussion (Misc queries) 2 June 22nd 06 08:27 PM
Help with sorting.. johncu Excel Discussion (Misc queries) 2 October 7th 05 10:09 AM


All times are GMT +1. The time now is 12:37 PM.

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

About Us

"It's about Microsoft Excel"