View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Beto[_3_] Beto[_3_] is offline
external usenet poster
 
Posts: 140
Default Macro for Multiple Sorts

Dakota wrote:
Thanks a lot. I got it to work. I had to change the first
part where you had set the range to "A1:G8". The number of
rows could vary each time we run the macro. I also had to
take out the "DataOption1:=xlSortNormal" parts of the
routine - VB wouldn't let me compile the code with them
in. It did not seem to matter that I took them out. What
does the reference "On Error GoTo 0" do?


Hi, "On Error GoTo 0" returns normality to the error-handling, because
with "On Error Resume Next" I said: "If you find an error, it doesn't
matter, just go on".

Now if the column number changes, you'll also need to change the For
loop acoordingly.

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.