vba - Error handling when opening a file -


I have the following code:

sub-patch ()

  Long as RK, tall as J, long as long as in the month, as long as year, year as year long = 2014 months = 2 to 2 Phase 1 day = 12 to 1 phase-1 next group workbooks. ("G: \ Manu + PVA + pomomalTrogram \ 10-Process and Tool \ 00 Paste Gestain Day Transformation \ 03 AMÉLIORER \ 20 Base Day Denise \ 00 Mproduct \ 19-Suivi \ Suivi du Cseries \ rapport quotidien \ Suivi Cseries_" and the day And "_" and the month and "_" and the year and ".xlsm") go to the error 0 '# # Content Workbook ("Suvi Series" and "Day" and "_" (Month and "_" And year and ".xlsm"). Close (false) Next day: next 'day next' mont and all  

When no file can be found I just cofe next file Of Gath wants to continue, so I kept "an error GoTo the next day" but it does not work. I still do not get the pop up file and debug pop up also appears.

Use this pattern:

  sub-patch () Dim as long as r, j As long as long, longer as long as mine, long mine, prolonged wb as long as my tenure application. Radrshn Ellts = false myYear = 2014 myMonth = 2 for the second phase - to resume Phase 1 error to myDay = 12 1 1 Next Set wb = workbook. Open ("G: \ manu + PVA + pomomalphyogram \ 10-process and tool \ 00 pastestation de change 03 AMÉLIORER \ 20 base day donation \ 00 Mproduct \ 19-Suivi \ Suivi du Cseries \ rapport quotidien \ Suivi Cseries_" & myDay & Amp; "_" & myMonth & amp; "_" and Mairie & amp; ".xlsm") error on GoTo 0 if no Wb is nothing '## Do Doo WB Close Fall Ind. Next 'next' mont application Displayer = True and All  

BTW , the VBA function with such names ( DAY, in which case day , < Do not use variables with special names like code> month , year sicne () , MONTH () , YEAR () )

will not work

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -