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: 194
Default URGENT - Need date format for SaveAs code

In my VBA module, I need to save an Excel file into a folder created by a VB
program. The VB date format code is:
dates = Day(Now) & " " & Left(MonthName(Month(Now)), 3) & " " & Year(Now)
which today gave me a folder as "Folder 6 Nov 2003".

The problem is the single digit for the day, which will become a
double-digit next week. My VBA code of:
Format(Now, "dd mmm yyyy")
wants to always give me a two-digit day - and then, of course, it can't find
the folder. How can I format this to give only a single digit on
single-digit days?

Thanks.
Ed


 
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
Code to conditional format all black after date specified in code? wx4usa Excel Discussion (Misc queries) 3 December 26th 08 07:06 PM
date format code in national language version Stefi Excel Discussion (Misc queries) 4 July 21st 08 09:18 AM
Code Date Format Depending on Computer format Myriam Excel Discussion (Misc queries) 0 July 17th 07 03:26 PM
date format in code TUNGANA KURMA RAJU Excel Discussion (Misc queries) 2 December 26th 05 03:42 AM
Problem with Date format from VBA code twig Excel Discussion (Misc queries) 3 December 7th 04 06:01 PM


All times are GMT +1. The time now is 01:39 AM.

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"