View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Illuminati Illuminati is offline
external usenet poster
 
Posts: 3
Default macro that opens file named in cell doesnt work

I wrote a macro that should open file with the name specified in cell
B8. It worked well yesterday but today I opened the file and the macro
doesnt work at all.

Could anyone tell whats wrong with the code.

Here it is the code:

Sub Import()

Sheets("Instruction").Select
Range("B8").Select
filetext = Selection.Value & ".xls"
directory = ".\"
Workbooks.Open directory & filetext

End Sub