![]() |
Sort problem (one column)
Hi,
I found out that the warning has nothing to do with it. Now, I still get the waring manually and I can sort programmatically. I don't know what has changed? When I close the workbook and restart it, the sort cannot take place (Error code 1004 method Sort of class Range failed). The sheet is protected but that state does not affect the error. After doing some actions, at a sudden time, the command works. Please help, Jos Vens "Jos Vens" schreef in bericht ... Hi, I have some difficulties to sort one column. A warning prevents me to sort programmatically 'My code spParameters.[aCampus].Sort Key1:=spParameters.[aCampus], Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom when I sort manually, I get this message, which is described on the internet If you only want to sort part of the data, you have to select it first: 1.. Click on the column heading letter B to select that column 2.. Click on [Sort Ascending] - a warning message appears: 3.. Select Continue with the current selection - press <Return for [Sort] Since my sort is only on one colomn, everything is OK with the current selection. How can I surpass this warning programmatically? Thanks Jos Vens |
Sort problem (one column) - Solution
Sorry for bothering you,
it was the protection of the sheet that did not let me sort! Unprotecting the sheet lets my code run fine. Sorry. Jos Vens "Jos Vens" schreef in bericht ... Hi, I found out that the warning has nothing to do with it. Now, I still get the waring manually and I can sort programmatically. I don't know what has changed? When I close the workbook and restart it, the sort cannot take place (Error code 1004 method Sort of class Range failed). The sheet is protected but that state does not affect the error. After doing some actions, at a sudden time, the command works. Please help, Jos Vens "Jos Vens" schreef in bericht ... Hi, I have some difficulties to sort one column. A warning prevents me to sort programmatically 'My code spParameters.[aCampus].Sort Key1:=spParameters.[aCampus], Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom when I sort manually, I get this message, which is described on the internet If you only want to sort part of the data, you have to select it first: 1.. Click on the column heading letter B to select that column 2.. Click on [Sort Ascending] - a warning message appears: 3.. Select Continue with the current selection - press <Return for [Sort] Since my sort is only on one colomn, everything is OK with the current selection. How can I surpass this warning programmatically? Thanks Jos Vens |
All times are GMT +1. The time now is 10:56 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com