Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro works at home but not at work
Hi All I have a macro that works fine at home but on none of work pc's. I have saved the document as an excel 97-2003 worksheet as that is what all other users have done (and their macro's work fine). Most of the code works apart from the sort section. Any advice anyone? Here is the code, (its the xlSortOnValues that goes wrong first, not sure if there will be other errors after that?) Thanks Mark Code: -------------------- 'Sort Sheets("Area Summary").Range("B7:M31").Select Application.CutCopyMode = False ActiveWorkbook.Worksheets("Area Summary").Sort.SortFields.Clear ActiveWorkbook.Worksheets("Area Summary").Sort.SortFields.Add Key:=Range( _ "M8:M31"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _ xlSortNormal ActiveWorkbook.Worksheets("Area Summary").Sort.SortFields.Add Key:=Range( _ "E8:E31"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _ xlSortTextAsNumbers With ActiveWorkbook.Worksheets("Area Summary").Sort .SetRange Range("B7:M31") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Range("B3").Select End Sub -------------------- -- markrennolds ------------------------------------------------------------------------ markrennolds's Profile: http://www.thecodecage.com/forumz/member.php?userid=543 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=120767 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro works Macro does not work | Excel Discussion (Misc queries) | |||
macro doesn't work on Excel for the mac but works on Windows XL?? | Excel Programming | |||
I moved a file from work to home and now my color macro does not w | Excel Worksheet Functions | |||
Simple Macro, works in Excel 2002, 2003 but won't work in 2000 | Excel Programming | |||
xyScatterChart macro works on WinXP Pro & not on WinXP Home? | Excel Discussion (Misc queries) |