Sorting cells in Shared Workbook...
Rats - It's all pretty much been blown out of the water now by Excel not
adding Menu Controls to the menu bar when the workbook is shared. Damnit - I
wish I'd checked that earlier on...without the menu controls the shared
workbook is pretty useless :-(
"Aran Black" wrote:
Hi George,
Microsoft says in their help files that you cannot create a shared excel
workbook if it has code in. That is, the code wont work! There are certain
elements (Excel facilities) that are "disabled" when a workbook becomes
shared. Your code calls some of this unsharable functionality. Hope this
helps.
Aran Black
"George" wrote:
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
|