LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
KDG
 
Posts: n/a
Default Macro to Sort automatically when file/save is selected

OK... first off, Thank you so much for your speedy response!
Second... I copied in this partial code into the VB editor on
"ThisWorkbook"... now (and I'm sorry if you feel you have to spoon feed me...
I get scared of code) Say my worksheet has a column with a header of
"Project" in column D and column E has "Assignment"... I would like it to
sort primary on column D and secondary on column E. How in the world to I do
this? I'm a good student, just one that has avoided learning any type of
programing or code for years and now it's coming back to bite me.

Thanks so much for your expertise and patience!!!

"Chip Pearson" wrote:

Open the ThisWorkbook module, and use the BeforeSave event
procedure.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
'
' your sort code here
'
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"KDG" wrote in message
...
I have a shared file that is being used by some rather
inexperienced Excel
users. This file will expand with extended use as each user
enters their
data. In order to make it easier for them to use, I'm trying to
automate some
things.

Is there a way... and I'm sure there is, I'm just not
experienced enough to
know how... that I can have my file automatically sort on a
particular column
when the user goes to save it? I'm thinking that this must be
either a macro
or VBA or whatever, but I am rather a novice in this area.




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically run a macro SheriTingle Excel Discussion (Misc queries) 2 July 12th 05 04:41 PM
Automatically clear values from a range of selected cells John Davies Excel Discussion (Misc queries) 1 June 28th 05 04:42 PM
Macro to automatically run Pam C Excel Discussion (Misc queries) 1 May 5th 05 02:35 PM
How can I set up a Macro to automatically run when I open a speci. Rick Martin Excel Discussion (Misc queries) 1 January 13th 05 05:06 PM
Automatically launch a macro when a fil is opened One-Leg Excel Discussion (Misc queries) 1 December 15th 04 08:12 PM


All times are GMT +1. The time now is 01:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"