LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA in Excel 2007, NumberFormat

Data entered into a form (in ADD_REP_DATE and ADD_PRD) are in "mm/dd/yyyy"
format, and I'm trying to put them in cells with "mmm-yy" format, but these
statements aren't doing it. I've tried moving the two format statements
before the data entry statements, to no effect.

NEC_SELECT.Offset(I, 0).Cells(1, 16) = Me.ADD_REP_DATE
NEC_SELECT.Offset(I, 0).Cells(1, 17) = Me.ADD_PRD
NEC_SELECT.Offset(I, 0).Cells(1, 16).NumberFormat = "mmm-yy"
NEC_SELECT.Offset(I, 0).Cells(1, 17).NumberFormat = "mmm-yy"

Also, I recorded a macro for formating the cells, and it came up with
{Selection.NumberFormat = "[$-409]mmm-yy;@"}. Putting this in before or after
the data entry didn't work either. Do I reformat the cells, or ID another
variable with the format? And where can I find how "[$-409]mmm-yy;@" is
broken down?
--
Michael JM
 
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
Excel automation through .NET Interop: NumberFormat property looks like NumberFormatLocal martin durtschi Excel Programming 4 May 13th 14 07:39 PM
NumberFormat TSW632 Excel Programming 1 October 31st 08 10:45 AM
Excel NumberFormat [email protected] Excel Programming 3 April 16th 07 01:58 PM
NumberFormat strings for Excel Cells R. L. Alan Jordan Excel Programming 2 July 26th 03 02:33 AM


All times are GMT +1. The time now is 04:55 PM.

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

About Us

"It's about Microsoft Excel"