View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
John Holland[_2_] John Holland[_2_] is offline
external usenet poster
 
Posts: 5
Default Treeview control and view of folders and files

forget my last message on picking up a reference to the file. must
obviously just be "filename", cheers, JH

"Tom Ogilvy" wrote in message ...
You may have a good reason to do this, but it seems like it would be simpler
to just do

Dim fName as Variant
fname = Application.GetOpenFilename("Excel Files (*.xls),*.xls")
if fName < False then
workbooks.Open fName
End If

--
Regards,
Tom Ogilvy


"John Holland" wrote in message
om...
I want to have a Treeview control on a userform that shows the
complete folder-tree(expandable) on a hard drive and Excel-files in
it.Then open a selected file as a Workbook to be able to communicate
with it. Can someone help me out with the necessary code to populate
the Treeview control and the code for opening a selected file as a
Workbook. I am lost here, none of the code i found with a google
search seems to be working properly, unless i am doing something
wrong,
thanks
JH