Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 05-06-2009, 11:37 PM
Bird_FAT's Avatar
Bird_FAT Bird_FAT is offline Sort By Last Name in a List Sort By Last Name in a List Office 2007
Expert
 
Join Date: Apr 2009
Location: South East
Posts: 271
Bird_FAT is on a distinguished road
Default Make a macro

I think the easiest thing for you to do would be to create your own Macro!

  • Go to the Visual Basic Editor and delete the code I gave you (a clean start)
  • Close the visual basic window
  • Open a document with a list of names in
  • (2003)
Tools > Macro > Record New Macro
  • (2007)
View > Macros > Record Macro

You will now get a 'Record Macro', here you need to change the name (call it what you want - NO SPACES ALLOWED though!) and click OK.

You should now see a little box with a pause and a stop button to let you know the recorder is running. Now do the following:

  • Ctrl+A (Select All)
  • Turn Text to Table
  • Sort by Column 2
  • Turn Table to Text
  • Click stop on the Macro Toolbar
YAY! You've just created your first macro!! Now you can do one final edit to tidy it up a little.

We are now going to Edit the Macro.

(2003)Tools > Macro > Macros > highlight your macro > Edit
(2007)View > Macros > View Macros > highlight your macro > Edit

The Visual Basic window will open showing the code for your macro.
Now, if you look back at the code that I put in my post - can you see the lines:
Code:
    ScreenUpdating = False
and
Code:
    ScreenUpdating = True
Notice where they are, and add them in the same place to your macro. What these lines do is stop the screen from showing your macro as it runs - otherwise you see it flickering through the different steps - this way it seems to miraculously go from unsorted, to sorted, and is much more professional looking!


Hope this is simple enough to follow! And ... now you know how to make your own macros, you can automate ALL SORTS of tasks that you find yourself doing over and over again.

If you need any more help - feel free to post a thread with us here - always happy to help!
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort By Last Name in a List how do i take my contact list to a new computer? blade Outlook 2 01-13-2011 07:03 AM
Sort By Last Name in a List List option shashijb Excel 1 12-18-2008 03:07 AM
Which app to use for list on Outlook? sus Misc 0 08-26-2008 08:46 AM
creating a categories list owwiii Outlook 0 08-09-2007 01:56 PM
Creating a Map From a List of Addresses aleccamp Excel 0 11-19-2005 03:04 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft