PDA

View Full Version : [SOLVED] problem with open file Run-time error 1004



elmnas
03-13-2015, 03:35 AM
Hi guys why do I get this error all the time?.....



I can open

UCHP_Translation2_advancedSearch_sv.xls without problem,

but when I trying to open this one

UCHP_Translation2_advancedSearch_sv_NoTrans.xls

the script a "." after xls why???


I get this error:

http://s14.postimg.org/50x9dxz4x/image.png

Could someone help me?

gmayor
03-13-2015, 03:55 AM
Change the line

Workbooks.Open (strCurrentFile)
to

Workbooks.Open strPath & strCurrentFile

elmnas
03-13-2015, 05:20 AM
Works as a charm!! thanks