Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default formatting a TextField as DD-MMM-YY format

If IsNumeric(Duration) Then
EndDte.txt = Format(Date + clng(Duration),"dd-mmm-yy")
End If

--
Regards,
Tom Ogilvy


Mike NG wrote in message
...
I have two fields on a UserForm, Duration and EndDte so that a default
is provided in the end date field

If IsNumeric(Duration) Then
EndDte = Date + Duration
End If

How do I format the EndDte as say 24-Sep-03, given that EndDte is
effectively a String
--
Mike



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default formatting a TextField as DD-MMM-YY format

just for completeness, there is a typo.

EndDte.txt = Format(Date + clng(Duration),"dd-mmm-yy")

should be

EndDte.text = Format(Date + clng(Duration),"dd-mmm-yy")

--
Regards,
Tom Ogilvy

Mike NG wrote in message
...
On Sun, 14 Sep 2003 at 10:12:37, Tom Ogilvy (Tom Ogilvy
) wrote:
If IsNumeric(Duration) Then
EndDte.txt = Format(Date + clng(Duration),"dd-mmm-yy")
End If

Many thanks - worked a treat
--
Mike



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
How do I conditionally format a row and copy the formatting to tab nandu1256 Excel Worksheet Functions 1 March 5th 10 04:15 AM
Using Format Painter with Conditional formatting Lynn Excel Discussion (Misc queries) 0 October 5th 09 02:24 PM
Conditional Formatting - Number Format AdmiralAJ Excel Worksheet Functions 8 March 18th 09 09:13 PM
Using Excel as a database and textfield C Tate[_2_] Excel Discussion (Misc queries) 13 March 12th 08 01:13 PM
Can I get rid of conditional formatting but keep format changes? Spaticus Excel Discussion (Misc queries) 5 December 4th 05 02:20 AM


All times are GMT +1. The time now is 05:02 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"