Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I am doing one Pruchase Order form in Excel. I want to creat the PO number as if date being Displayed in regular number. i.e 18/11/2005 as if 18112005 and than followed by "-" and increasing value. If I will open and print off 5 times in a day. The last number has to be 18112005-5. Is there anybody can help me on it. Kind Regards Manish |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Manish :
reference Workbook_BeforePrint add this code to Thisworkbook if range("A1") is empty 'Thisworkbook Private Sub Workbook_BeforePrint(Cancel As Boolean) If Range("A1") = "" Then n = 1 Else s = VBA.Split(Range("A1"), "-") n = s(1) + 1 End If Range("A1") = VBA.Format(Date, "ddmmyy") & "-" & n End Sub -- 天行健,君*以自強不息 地勢坤,君*以厚德載物 http://www.vba.com.tw/plog/ "Manish Patel" wrote: Hi I am doing one Pruchase Order form in Excel. I want to creat the PO number as if date being Displayed in regular number. i.e 18/11/2005 as if 18112005 and than followed by "-" and increasing value. If I will open and print off 5 times in a day. The last number has to be 18112005-5. Is there anybody can help me on it. Kind Regards Manish |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Imported data changes to date format (5-1-5 changes to May 1, 2005 | Excel Discussion (Misc queries) | |||
I have a date 51231 (2005,dec,31) -I want to change to 2005/12/31 | Excel Worksheet Functions | |||
Convert alphanumerical(eg. 12.11.2005) to date as 12-Nov-2005 in e | Excel Discussion (Misc queries) | |||
how do i update the date on a 2005 calendar template | Excel Discussion (Misc queries) | |||
chnage date from tuesday 4 January 2005 10:39.26 to 04/01/2005 | Excel Worksheet Functions |