Share via

MsgBox Day & Date Format

Anonymous
2013-01-29T18:05:54+00:00

Hi,

I have a MsgBox that loads to tell the User the Plan Date, I would like to be able to show the Day and Date. ie: Tuesday  29/01/13

Cell "B2" is formatted in the spreadsheet as dddd  dd/mm/yyy

YesNo = MsgBox("Loading Plan for   " & Worksheets("Sheet2").Range("B2").Value & ".", vbYesNo + vbCritical, "Caution")

Select Case YesNo

Case vbYes

'Insert your code here if Yes is clicked

Case vbNo

'Insert your code here if No is clicked

End Select

Thank You

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2013-01-29T18:17:26+00:00

Nicky wrote:

I have a MsgBox that loads to tell the User the Plan Date, I would like to be able to show the Day and Date. ie: Tuesday  29/01/13

Cell "B2" is formatted in the spreadsheet as dddd  dd/mm/yyy

YesNo = MsgBox("Loading Plan for   " & Worksheets("Sheet2").Range("B2").Value &

".",vbYesNo + vbCritical, "Caution") 

YesNo = MsgBox("Loading Plan for   " & _

    Format(Worksheets("Sheet2").Range("B2"),"dddd dd/mm/yyyy") _

    & ".",vbYesNo + vbCritical, "Caution")

Was this answer helpful?

0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2013-01-29T18:18:34+00:00

    Try,

    YesNo = MsgBox("Loading Plan for   " & Format(Worksheets("Sheet2").Range("B2").Value, "dddd dd/mm/yy") & ".", vbYesNo + vbCritical, "Caution")

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-01-29T18:17:47+00:00

    Hi,

     

    I have a MsgBox that loads to tell the User the Plan Date, I would like to be able to show the Day and Date. ie: Tuesday  29/01/13

    Cell "B2" is formatted in the spreadsheet as dddd  dd/mm/yyy

     

     

    YesNo = MsgBox("Loading Plan for   " & Worksheets("Sheet2").Range("B2").Value & ".", vbYesNo + vbCritical, "Caution")

    Select Case YesNo

    Case vbYes

    'Insert your code here if Yes is clicked

    Case vbNo

    'Insert your code here if No is clicked

    End Select

     

     

    Thank You

    Try it like this...

    YesNo = MsgBox("Loading Plan for   " & Text(Worksheets("Sheet2").Range("B2").Value,"dddd dd/mm/yyyy) & ".", vbYesNo + vbCritical, "Caution")

    EDIT NOTE: Mixed up worksheet formula with VBA... that Text function call was supposed to have been Format as Jeeped shows in his post. Sorry for any confusion that might have caused.

    Was this answer helpful?

    0 comments No comments