Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have run time error 1004 while running a macro. It says Microsoft Office
Excel can not access the file. But file is there. Is anuthing wrong in the code? OutputFile = "C:\users\hz7fff\Desktop\Monthly Settlement\Monthly Output Files\" Report_Workbook = ActiveWorkbook.Name If (Left(Report_Workbook, 11) = "Settlement ") Then ActiveWorkbook.Names.Add Name:="Settlement_Data", RefersToR1C1:= _ "='Monthly Settlement Statement'!C1:C8" ActiveWorkbook.Names.Add Name:="Copy_Row", RefersToR1C1:= _ "='Monthly Settlement Statement'!RC1,'Monthly Settlement Statement'!RC2,'Monthly Settlement Statement'!RC4,'Monthly Settlement Statement'!RC8" Range("A1").Select ' Message = "Enter the year and month for the data just processed in YYYYMM format." Title = "FileName" Data_Date = InputBox(Message, Title) ' Save_File = "Settlement " & Left(Data_Date, 4) & "-" & Right(Data_Date, 2) & ".xls" Save_FullName = OutputFile & Save_File ''''''''''''''''''''''''''''''''''''''It stops here ActiveWorkbook.SaveAs Filename:= _ Save_FullName, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False '''''''''''''''''''''''''''''''Please help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
run time error 1004 general odbc error excel 2003 vba | Excel Programming | |||
Run time error 1004 Object defined error | Excel Programming | |||
Run Time Error 1004: Application or Object Defined Error | Excel Programming | |||
Run Time 1004 Error: Application or Object Difine Error | Excel Programming | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming |