View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
jack jack is offline
external usenet poster
 
Posts: 186
Default Open files from List

Dave

thanks - i had the file as an excel 2007 once i changed it to 2003 this
worked.

"Dave Peterson" wrote:

If the workbook is opening, then the macro stops, change the shortcut key that
you use to run the macro. Do not include the shift key.

If the code stops before the workbook is opened, then what's the error? Maybe
you don't have a workbook with that name????



Jack wrote:

I'm trying to open a group of files from a list starting at D5 on the Menu
worksheet.
Following is the code i have tried.

sub open_files()
dim fname
With ActiveWorkbook
fname = "c:\documents\" & .worksheets("Menu").range("D5").value & ".xls"
Workbooks.Open Filename:= fname
End With
End Sub

the macro stops at the workbooks.open step - help would be appreciated


--

Dave Peterson