View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Pat Pat is offline
external usenet poster
 
Posts: 210
Default Sub Macro vrs Function Macro Auto Start

JLatham after I sent my last response to you to answer your questions I
thought maybe I am going about this wrong and making it harder. What I have
is a sheet that has:
(A) (B) (C) (D)
Week # Date Bowled Game # Score
I want this data to move to (F), (G), (H),(I), on the same sheet with the
Highest Scores 1st down. Is there a formula I can use instead ? I need the
data to remain as is in A,B,C,D so I can get the Weekly Scores, and the data
in F,G,H,I so I can get Season Scores by dates.
Thanks again,

"JLatham" wrote:

Pat, I'm a bit confused, so I need to ask you to restate the problem You
make mention of two workbooks. My question is:
*What* do you want to happen in *which workbook* when an end user enters new
scores?

The Workbook_Open() event processor is associated with an individual
workbook. Whatever code you put into it will be executed when the workbook
is opened, each time it is opened.

To have some code run each time someone makes a change to data on a
worksheet you would want to use a the Worksheet_Change() event processor. To
get into the area to use that code, right-click on the sheet's name tab and
choose [View Code] from the list.

There are 2 main differences between a Sub and a Function. A Function
(normally) returns a value and a Function (usually) can be referenced in a
formula on a worksheet by its name. A Sub doesn't have those abilities.

Also, if you publish your code here, we may be able to look at it and
determine why you're getting errors. Don't worry - we've all seen attempts
at coding by novices before (we were all a novice at one time ourselves) that
didn't quite get the job done.

"Pat" wrote:

I have data where an end user put's scores in & this is linked to a workbook
called Team # 1 scores. This updates a sheet "Team Scores Weekly which
updates another sheet in the same workbook "High Game Scores". I created a
macro to copy & sort the High Game Scores from High to Low which works fine
when I click the button. I want this automatically sort as Scores are
entered each week by end user. I changed the macro to a Function. After
reading other questions made a new macro & used the function & macro together
got a value error & excel encounterd a problem & kicked me out. I know its
me. I read about Workbook_open etc from all the other questions. I'm new so
?? Please help.