Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Value Returned in Message Box Q

I have the following Message box that appears on Wroksheet_Open. It
returns a date value from sheet Sum AC1, but instead of appearing in
the MB as 02/12/07, it appears as 02/12/07 17:00. The cell AC1 is
formatted as Date: dd/mm/yy. How can I also get the value that is
returned in AC1 appear in the MB as dd/mm/yy?



MsgBox "Be on Time submitting" & vbCr & _
"" & vbCr & _
"Next due date is 5:00pm on " & Worksheets("Sum").Range("AC1")
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Value Returned in Message Box Q

Sean,

Change

Worksheets("Sum").Range("AC1")

to

Format(Worksheets("Sum").Range("AC1").Value,"dd-mmm-yyyy")

or to

Worksheets("Sum").Range("AC1").Text

Change the number format to the appropriate date string.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"Sean" wrote in message
...
I have the following Message box that appears on Wroksheet_Open. It
returns a date value from sheet Sum AC1, but instead of appearing in
the MB as 02/12/07, it appears as 02/12/07 17:00. The cell AC1 is
formatted as Date: dd/mm/yy. How can I also get the value that is
returned in AC1 appear in the MB as dd/mm/yy?



MsgBox "Be on Time submitting" & vbCr & _
"" & vbCr & _
"Next due date is 5:00pm on " & Worksheets("Sum").Range("AC1")


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Value Returned in Message Box Q

try using format

MsgBox Format(Worksheets("Sum").Range("AC1"), "mm/dd/yy")
--


Gary


"Sean" wrote in message
...
I have the following Message box that appears on Wroksheet_Open. It
returns a date value from sheet Sum AC1, but instead of appearing in
the MB as 02/12/07, it appears as 02/12/07 17:00. The cell AC1 is
formatted as Date: dd/mm/yy. How can I also get the value that is
returned in AC1 appear in the MB as dd/mm/yy?



MsgBox "Be on Time submitting" & vbCr & _
"" & vbCr & _
"Next due date is 5:00pm on " & Worksheets("Sum").Range("AC1")



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Value Returned in Message Box Q

Thanks Chip & Gary

Reply
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
same name being returned Zombie0635 Excel Discussion (Misc queries) 8 October 26th 07 07:45 PM
#N/A value is returned Sai Excel Worksheet Functions 7 July 15th 07 11:05 PM
Error being returned Pat Excel Worksheet Functions 4 January 17th 05 04:33 PM
#Value! Returned ? John Excel Worksheet Functions 2 December 6th 04 08:55 PM
#Ref! Returned KRCowen Excel Programming 1 December 4th 04 08:16 AM


All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"