• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA code to format the report and copy paste

Hi Deepak,
I am not able to attach screen shot. Its a Debug error Run time error 52 Bad file name or number. Please help me with this. its for the line " If Len(Dir(source1)) = 0 Then". Thanks for you kind help

Regards,
Deepa9
 
Hi Deepak,
I am not able to attach screen shot. Its a Debug error Run time error 52 Bad file name or number. Please help me with this. its for the line " If Len(Dir(source1)) = 0 Then". Thanks for you kind help

Regards,
Deepa9

Ya. Share the same.
 
You are still wrong source path.

do the following to understand the same.

paste the below formula in a cell of source excel file(dump file).

="source1 = """&TRIM(LEFT(SUBSTITUTE(SUBSTITUTE(CELL("filename"),"[",""),"]",REPT(" ",199)),199))&""""

upload_2014-12-9_0-5-10.png


copy that cell & paste in macro where source1 will look like as below.

upload_2014-12-9_0-5-52.png
 
Hi Deepak,
I have added this macro in Sample file and not the dump file. before i have saved both the files in Xlsm format. then for source1 i have given Raw dump file source below is the formula.
source1 = "D:\Deepa\imp doc\order reports & notes\VBA Test files\Raw_dump.xlsm" & "\" & "D:\Deepa\imp doc\order reports & notes\VBA Test files\Sample_file.xlsm" before this one was in Xls and one was in Xlsx format.

still I am getting the same error sorry for the trouble.

Thanks in advace
 
Back
Top