View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
George George is offline
external usenet poster
 
Posts: 347
Default Sorting cells in Shared Workbook...

Hi, I've currently got shared workbook that pulls in data (onto the data
sheet) which I then sort two columns a time. The data sheet contains staff in
different departments along with a shift identifier.

When the workbook isn't shared this code:
With dataSheet.Range("A:B")
.Sort Key1:=Cells(2, 1), Order1:=xlAscending, Key2:=Cells(2, 2),
Order2:=xlAscending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False,
DataOption1:=xlSortNormal
End With

works fine. When the workbook is shared Excel doesn't seem to want to play
ball with regard to restricting the sort to the columns I've specified - it
sorts the whole sheet. By the time it's gone through the four different
departments (A:B, C:D, E:F, G:H) the whole things in a damn mess quite
frankly and this ruins the named ranges that I've also setup.

Does anyone have any idea how I can enforce this restriction of sorting on
columns when the workbook is shared?

Thanks
George