Could someone help me with this?
I want MSGBOX if current day is NOT Monday.
Somethingn like this.
![]()
Please Login or Register to view this content.
Could someone help me with this?
I want MSGBOX if current day is NOT Monday.
Somethingn like this.
![]()
Please Login or Register to view this content.
Not sure how you would build this into your code (my VBA sucks), but this will tell you if the date is not monday....
=WEEKDAY(A15,2)>1
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
try edit this:
![]()
Please Login or Register to view this content.
so probably it'll be like this:
![]()
Please Login or Register to view this content.
don't worry, there's a lot of people that are far more confused than you
but if you liked what i suggested. Click for me the "Add Reputation" - that way, we'd be both happy.
Here's little bit more of it.
I can't get it to put X on B27.![]()
Please Login or Register to view this content.
change that to this:
![]()
Please Login or Register to view this content.
What's the difference, beside the mispell of TWONE?
Anyway, it didn't work.
It's this part it doesn't like.
![]()
Please Login or Register to view this content.
gota be the mispelled part...
it should be
and no need to put the else statement if you have nothing else... :D![]()
Please Login or Register to view this content.
I got it.
![]()
Please Login or Register to view this content.
you could make it like...
if there's nothing else in the else statement then the above code should be fine![]()
Please Login or Register to view this content.
Ok, I guess I need help understanding this weekday stuff.
The code above is one I got from internet.
Trying to understand their explanation but not getting it.
I get Sunday = 1 thru Saturday = 7
this part i just dont understand.
Could someone show me a sample code?![]()
Please Login or Register to view this content.
If it's Monday,
msgbox "IT IS MONDAY"
If it NOT Monday
msgbox "today is NOT Monday"
Microsoft office's explanation of that function can be found on the help too in the VB editor.
you don't have to use all 4 examples, at least 1 can work for your purpose,
Syntax
WeekdayName(weekday, abbreviate, firstdayofweek)
example:
would return "Monday"![]()
Please Login or Register to view this content.
Day of the week
First day of the week you consider
(i believe)the above function cannot discriminate the current date if its monday or not since it doesn't take a variable like a date
Ok, someone just told me this and I like it a lot and easy to understand.
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks