View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob[_23_] Rob[_23_] is offline
external usenet poster
 
Posts: 8
Default passing a value to another function

Hey folks,

I'm a little rusty with my VBA...

I created a few lines of code that will allow me to insert the names of each
directory and all of the files from each directory to a word document. I
will eventually pass the same info into an excel sheet. Eventually, I may
find a need to create a hyperlink to each folder/file but that is way down
the line. I did it once in JAVA, but lost the code years ago due to
non-use. I also hate JAVA, but thats not the issue here.

My code works perfectly, but I added a full path (i.e "C:\Temp") to my
fuction call.

What I want to do is allow the user to pick the directories to copy using
(what I think is called) a windows common dialog box.

Once I select the folder I wish to start in, I want to pass the full path to
my function call (in a string variable)

I tried this with with the filedialog property, but you cannot pick a folder
(you must pick a file)

Any ideas?