View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Marie Bayes Marie Bayes is offline
external usenet poster
 
Posts: 84
Default I require code to run a macro dependant on the date

Thanks Gary's student, but I'm not that clever. I was hoping someone could
actually give me the code that would tell me what last month was and then how
I could 'jump' to that part of my macro.

"Gary''s Student" wrote:

Use the CASE statement with separate sections for each month.
--
Gary's Student
gsnu200701


"Marie Bayes" wrote:

I need to run a macro over a year, I would like to set it up at the start of
the year but set each part to run dependant on what month I'm in. I always
run the report for data entered up to yesterday, ie, if it's the 1st of Feb
will be running Jan's macro. Is there a way I can write into the code to
call the section just for that month and then at the end of that section
continue with the remainder of the macro? Thanks in advance for your help.