Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Save As Function

I am trying to create code that will save a workbook based on a date in a
cell on a sheet within the workbook. I have started the code but VB doesn't
like it. See below:
ActiveWorkbook.Save
Sheets("Schedule").Select
ActiveWorkbook.SaveAs Filename:= _
"T:\Period End Schedules\Inventory Account Schedules\Inventory
Obsolescence\Schedule\" & Month("A2") & "/" & Day("A2") & "/" & Year("A2") &
".xls", FileFormat:=xlNormal, Password:="", WriteResPassword:="Password", _
ReadOnlyRecommended:=False, CreateBackup:=True

End Sub

The problem I am having is that the code bombs at the SaveAs command. How
do I get around this?
--
Hlewis
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 163
Default Save As Function

Hi,

a slash "/" is not a valid character in a filename.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
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
auto save function N Ravinder Excel Worksheet Functions 2 June 4th 09 01:00 PM
Save result of IF function Rebbeca New Users to Excel 6 February 16th 09 01:44 PM
Always prompted for Save with function GM Excel Programming 3 February 3rd 06 07:56 PM
Save and Save as Function gone Michael S. Excel Programming 2 June 27th 05 06:41 PM
Disable save Function JB Excel Discussion (Misc queries) 1 May 25th 05 09:58 PM


All times are GMT +1. The time now is 05:25 AM.

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"