save as issue
good morning,
once again i am back because all of the help that i have recieved before cannot help me out again. i am using Office 2007, and have a work schedule that works. i want to make a macro that emails out a copy, and saves a copy in c:/files the issue revolves around the date. the date displays in the format yyyy-mm-dd but in the formula bar is shows as dd/mm/yyyy. i want to save the file with the same format and date that shows in cell B2 (yyyy-mm-dd). i found the code below: Dim fname as String With ActiveWorkbook.worksheets(1) fname = format(.Range("B2").Value,"yyyymmdd") & ".xlsx" .SaveAs fname End With but when it goes to save the files, it saves the file name as 18991230 but the date in the cell B2 is April 02, 2008. if i can get past this issue, i think i can get the rest of the code written myself. any help on this is appreciated. thank you, |
save as issue
Make sue that the first sheet is the sheet containing the April date
-- Gary''s Student - gsnu200775 "jatman" wrote: good morning, once again i am back because all of the help that i have recieved before cannot help me out again. i am using Office 2007, and have a work schedule that works. i want to make a macro that emails out a copy, and saves a copy in c:/files the issue revolves around the date. the date displays in the format yyyy-mm-dd but in the formula bar is shows as dd/mm/yyyy. i want to save the file with the same format and date that shows in cell B2 (yyyy-mm-dd). i found the code below: Dim fname as String With ActiveWorkbook.worksheets(1) fname = format(.Range("B2").Value,"yyyymmdd") & ".xlsx" .SaveAs fname End With but when it goes to save the files, it saves the file name as 18991230 but the date in the cell B2 is April 02, 2008. if i can get past this issue, i think i can get the rest of the code written myself. any help on this is appreciated. thank you, |
All times are GMT +1. The time now is 01:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com