LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default passing a value back to original routine

On Mar 8, 3:26*pm, "RB Smissaert"
wrote:
If the function is called 7 times in the same procedure then you can do
this:

Dim lSum As Long

lSum = lSum + GetUnAllocatedJobs("Monday")
lSum = lSum + GetUnAllocatedJobs("Tuesday")

etc.

If it is called in different procedures then lSum has to be a Public
(applies to whole workbook)
or Private (applies to that module only) variable.

RBS

"MJKelly" wrote in message

...

Thanks for the replies.


Could you just explain how I use the function?


macro1 does a number of things and calls the function 7 times...
At the end of macro1, I want to tell the user the total number of
unallocated jobs (all days added together).


So, would this be msgbox getunallocatedjobs?
I still only see this working by declaring a public variable to hold
the unallocated jobs for Monday, then add Tuesday count to it and so
on. *This being the value of x for each time the function is called?


Thanks,
Matt


Excellent. Thanks very much.
Kindest regards,
Matt
 
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
Going back to original location Té Excel Discussion (Misc queries) 1 August 27th 09 03:06 AM
Back to original Formating parteegolfer Excel Programming 3 February 28th 06 07:01 PM
Back to original file brook6 Excel Programming 3 April 7th 04 08:06 PM
Passing arguments to a sub routine... Jeff Harbin[_2_] Excel Programming 2 January 29th 04 03:25 AM
using VBA to go back to the original value before the cell was changed mika. Excel Programming 2 September 10th 03 09:09 PM


All times are GMT +1. The time now is 09:40 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"