User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 456,593 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,534 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 20728 | Replies: 1
Reply
Join Date: Mar 2004
Location: Brisbane
Posts: 632
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Rep Power: 7
Solved Threads: 6
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Excel Macro using vba :(

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2004
Location: Adelaide, Australia
Posts: 191
Reputation: mnemtsas is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
mnemtsas's Avatar
mnemtsas mnemtsas is offline Offline
Junior Poster

Re: Excel Macro using vba :(

  #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:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 19/8/2004 by Mark Nemtsas
'

'
    Columns("A:D").Select
    Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 6:45 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC