LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Determining weather a macro will run or not


Hi – I am looking for some help
I would like to base weather a macro runs or not based on the day fo
the week.
I have a button for each day of the week that an operator would push t
complete some tasks. I want to avoid the potential of the operato
pushing the wrong button – (I.e. the wrong day).
I was thinking of using =today() and =weekday() functions in workshee
somewhere to test against. So that when the macro starts, I could tes
the =weekday() against a hard coded value on the macro.
For example:
If Windows("spreadsheet.xls").Activate
Range("A!").Select = 4 – (where 4 is equal to =weekday() )
Then – run the macro ….
Else – do nothing – or maybe an error message box – telling th
operator to choose the right button
Any help !??!?!?!

--
richie
-----------------------------------------------------------------------
richiek's Profile: http://www.excelforum.com/member.php...fo&userid=2769
View this thread: http://www.excelforum.com/showthread.php?threadid=47213

 
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
Automatic weather Damian Excel Discussion (Misc queries) 6 August 27th 09 02:41 PM
Weather Chart David D Charts and Charting in Excel 3 December 5th 05 03:39 PM
Determining a call in a macro Mark Excel Discussion (Misc queries) 2 April 26th 05 09:06 PM
Determining the Name of a Caller Macro SidBord Excel Programming 2 April 17th 04 07:23 PM
Determining if Macro Can Run mikem Excel Programming 4 February 15th 04 09:26 PM


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