Excel Macro using vba :(

Reply

Join Date: Mar 2004
Posts: 634
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Solved Threads: 7
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Excel Macro using vba :(

 
0
  #1
Aug 18th, 2004
hey guys... I want to be able to auto sort rows ascending in a worksheet according to the first column... I want to make a visual basic macro for this... any ideas?

Thanks in advance
Formerly known as Slade.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 200
Reputation: mnemtsas is an unknown quantity at this point 
Solved Threads: 1
mnemtsas's Avatar
mnemtsas mnemtsas is offline Offline
Junior Poster

Re: Excel Macro using vba :(

 
0
  #2
Aug 19th, 2004
Originally Posted by slade
hey guys... I want to be able to auto sort rows ascending in a worksheet according to the first column... I want to make a visual basic macro for this... any ideas?

Thanks in advance
Try recording the macro, that's how I taught myself VB to begin with. here's the code from me recording a sort:

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Sub Macro1()
  2. '
  3. ' Macro1 Macro
  4. ' Macro recorded 19/8/2004 by Mark Nemtsas
  5. '
  6.  
  7. '
  8. Columns("A:D").Select
  9. Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
  10. OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
  11. End Sub
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC