Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() I have a TextBox on a UserForm that shows what is in cell "A1" on my spreadsheet. The contents of "A1" is always a date and is formatted to show the date as dd-mmm-yyyy. Assuming the date in cell "A1" is 28-Mar-2006, and by highlighting the cell it also shows the same format at the top of the spreadsheet, why does the TextBox show the date as 3/28/2006?? I want it to look like "A1" or at the very least 28/3/2006. -- grahammal ------------------------------------------------------------------------ grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336 View this thread: http://www.excelforum.com/showthread...hreadid=527111 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
in the userform initialize event:
Me.Textbox1.text=format(range("A1").Value,"dd-mmm-yyyy") or Me.textbox1.text = range("A1").Text "grahammal" wrote: I have a TextBox on a UserForm that shows what is in cell "A1" on my spreadsheet. The contents of "A1" is always a date and is formatted to show the date as dd-mmm-yyyy. Assuming the date in cell "A1" is 28-Mar-2006, and by highlighting the cell it also shows the same format at the top of the spreadsheet, why does the TextBox show the date as 3/28/2006?? I want it to look like "A1" or at the very least 28/3/2006. -- grahammal ------------------------------------------------------------------------ grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336 View this thread: http://www.excelforum.com/showthread...hreadid=527111 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Where exactly do I enter what you have suggested. Am using Excel97 By the way, What does Me.xxxxxxx actually mean as I have tried to enter suggested commands before and it always errors because of the 'Me' part of the program. -- grahammal ------------------------------------------------------------------------ grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336 View this thread: http://www.excelforum.com/showthread...hreadid=527111 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In the VBE environment "select" your Userform in the Project Explorer
window, then at the menu click on View, then Code.. In code window that comes up (Userform should appear in the Left top dropdown Object box) Type out in the code window: Private Sub UserForm_Initialize() Me.Textbox1.text=format(range("A1").Value,"dd-mmm-yyyy") End Sub The Keyword "Me" means (a substitute for) "the objectname that this code resides in" HTH, Jim May "grahammal" wrote in message ... Where exactly do I enter what you have suggested. Am using Excel97 By the way, What does Me.xxxxxxx actually mean as I have tried to enter suggested commands before and it always errors because of the 'Me' part of the program. -- grahammal ------------------------------------------------------------------------ grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336 View this thread: http://www.excelforum.com/showthread...hreadid=527111 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can't format cell - have tried unlocking and unprotecting | Excel Discussion (Misc queries) | |||
why does currency format change to number format? | Excel Discussion (Misc queries) | |||
Keep custom format in new worksheet | Excel Discussion (Misc queries) | |||
Copying a conditional format | Excel Worksheet Functions | |||
When I select "format cells", the format dialog box does not disp. | Excel Worksheet Functions |