Run time error '1004'

kaka4u

New Member
Joined
May 4, 2009
Messages
5
Hi,

I am getting follwoing error while running below macro:


Microsoft Office Excel cannot access the file 'c:\Documents and Settings\Kaka\Desktop\Attachment_6\24\2011'. There are several possible reasons:
  • The file name or path does not exist.
  • The file is used by another program.
  • The workbook you are trying to save has the same name as a
Macro

Sub SaveMe()
Dim fName As String
fName = Application.GetSaveAsFilename("Attachment_" & Date, FileFilter:="Excel Files (*.XLS), *.XLS", Title:="Save As")
ActiveWorkbook.SaveAs Filename:=fName

End Sub


Any help would be greatly appreciated.



Thanks
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the board...

For 1 thing, that is not a file

'c:\Documents and Settings\Kaka\Desktop\Attachment_6\24\2011'

That appears to be only a PATH.
There is no .xls or any extention..


It would help to post the code as well..
 
Upvote 0
Hi Jonmo1,

Thanks a lot for your quick reply. Your reply helped me to understand the problem and take action. Thanks once again.

kaka
 
Upvote 0

Forum statistics

Threads
1,224,581
Messages
6,179,668
Members
452,936
Latest member
anamikabhargaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top