Shashi, Thanks for taking the time to address my problem, much appreciated. Your solution for CommandButton1 works. Now I have to integrate it into my worksheet/format. Originally, I used the macro recorder to create the code, which does a typical ascending sort. In my post, the range of all columns and rows sorted is B3:AA39. The sort column range is G4:G39 (where the contract numbers are held).
Running the code, I get a Run-time error '1004': This formula is missing a range reference of a defined name. Clicking Debug, the "sort now" line is highlighted: Range("A4").Sort....
Column A is not used for data entry.
How to modify the code?
|