Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2007

Tip: Looking for answers? Try searching our database.

Run Part of a Code If Q

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sean - 14 Feb 2007 12:37 GMT
I have a piece of Code (part of several within the same module) that
mails out a spreadsheet, but I only want it to action if the value in
SheetA1 = Monday (A1 will actually be =Now()). If the Value in A1 is
not = Monday I just want to skip over the code and execute the remaing
code.

How would I do that?

Thanks
merjet - 14 Feb 2007 13:32 GMT
If Weekday(Sheets("Sheet1").Range("A1")) = vbMonday Then
   'do something
End If

Hth,
Merjet
Sean - 15 Feb 2007 07:26 GMT
> If Weekday(Sheets("Sheet1").Range("A1")) = vbMonday Then
>     'do something
> End If
>
> Hth,
> Merjet

Thanks Merjet
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.