LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default If statements in macros

I have a macro to send an automated email when passwords need renewing. This
all works fine, but what i want to do is set up another macro to run
automatiocally at 00:00:01 to check if any passwords need changing.

What i have so far is this:-

Sub CheckDay()
Application.OnTime TimeValue("17:00:00"), "my_Procedure"
Range("D7:D30").Select
If Range = 5 Then
Sub SendEmail()
Else
End If
End Sub

So what i want is if a cell in range D7 - D30 is 5 then sub the macro
SendEmail.

For some reason it is not workign and i can't work out why. Any help would
be much appreiciated.
 
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
How can I use wildcards in IF statements and Macros AlanF Excel Discussion (Misc queries) 2 November 22nd 09 11:08 PM
Excel 2007 macros - how to merge 5 macros together into one Sue Excel Discussion (Misc queries) 1 April 16th 08 08:36 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM
How do i start Macros using IF statements? xXx Katie xXx Excel Discussion (Misc queries) 2 August 22nd 05 03:13 PM


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