#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 88
Default 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,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default 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,

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
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
when excel save as csv,double quotes in an cell issue frank Excel Discussion (Misc queries) 0 October 26th 07 03:14 AM
File Save/Save As Issue Josh O. Setting up and Configuration of Excel 3 August 28th 07 06:33 PM
Save As Authentication Issue From ASP.NET Matt Schwartz Excel Discussion (Misc queries) 0 June 9th 06 05:34 AM
UserForm Save Issue DarnTootn Excel Worksheet Functions 0 May 11th 06 05:15 PM


All times are GMT +1. The time now is 03:14 PM.

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"