LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default File name equal cell contents

Hi,
I'm getting back to this old question, some problems doesn't go away.

I have this macro and it works fine until invoice has already been saved.
First ofcourse excel wants to know if I want replace earlier file - no -
next popup is
"Runtime error 1004
Method 'SaveAs' of object '_Workbook' failed.

How can I get excel to say for ex "file couldn't be saved, check nr or
receiver OR replace older file" This problem doesn't come up if I want
replace old file.

Sub Macro1()

ActiveWorkbook.SaveAs Filename:="D:\SentInvoices\" & Range("C3").Value _
& Range("A8").Value & ".xls", _
FileFormat:=xlNormal, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False

End Sub
 
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
Adding the contents of a cell to a formula Paul Bond Excel Discussion (Misc queries) 1 January 21st 06 07:19 PM
Conversion of Cell Contents into a Functional Worksheet name ? GMJT Excel Worksheet Functions 1 August 21st 05 04:59 PM
File name equal cell contents ynissel Excel Discussion (Misc queries) 0 May 25th 05 03:41 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
make cell contents equal to null value - not blank, but empty mpierre Excel Worksheet Functions 1 December 29th 04 06:57 AM


All times are GMT +1. The time now is 06:12 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"