+ Reply to Thread
Results 1 to 4 of 4

Message to user based on what day of the week they input

  1. #1
    Registered User
    Join Date
    01-11-2023
    Location
    San Diego
    MS-Off Ver
    Excel
    Posts
    1

    Question Message to user based on what day of the week they input

    Hi everyone,

    Can someone help me with this?

    Write a sub that prompts the user for the day of the week. Using an If statement, if the user responds with a weekend day invite the user to enjoy it while they can, if the user responds that it is a day between Monday and Thursday tell them how many days are left until the weekend, and if the user responds that it is Friday congratulate them on making through the week.

    This is what I did, but I cant make it work.
    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 01-11-2023 at 11:42 PM. Reason: better titles please; added code tags

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: VBA Problem

    Welcome to the Forum !

    Before you post again please take the time to review our rules. There aren't many, and they are all important. You have violated two rules in your first post. I have fixed them for you because you are new:

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here




    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Message to user based on what day of the week they input

    Here is a very brute force solution to your question. If I were doing this I would use a UserForm for input instead of an InputBox so I could control the user input and use arithmetic on the days of the week. As it is you have to deal with strings.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: Message to user based on what day of the week they input

    What is the user inputting?
    A day string "Wednesday", a day number (4) or a date?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 07-01-2018, 01:58 PM
  2. [SOLVED] Excel Macro - Copy & Paste (Font) problem & Delete Last Added Rows problem
    By LennartB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2015, 06:58 AM
  3. Replies: 6
    Last Post: 10-20-2013, 07:16 PM
  4. input box problem, cell filtering problem, result display while locking sheet
    By croozin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2013, 08:52 AM
  5. Replies: 6
    Last Post: 05-28-2013, 05:08 PM
  6. Replies: 2
    Last Post: 01-22-2013, 07:09 AM
  7. Started out as an Access problem. Now an Excel problem
    By RobertM in forum Excel General
    Replies: 2
    Last Post: 04-26-2006, 02:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1