I wrote a function in VBA called OpenSPDFiles:
i pass it those parameters and it opens the file(s) specified by the parameters. in the end OpenSPDFiles equals a string that is just the concatenated filenames of the files it opened. if i dont pass an argument, a userform opens up and asks for the data.Please Login or Register to view this content.
when I call it from another VBA code, it works fine - the files open. but if i go into an excel cell and type =OpenSPDFiles(... the files dont open. but the cell value DOES show the file names of what was supposed to open. AND, if i dont supply one of the params, the userform DOES show. why doesnt the function open the files? I use Workbooks.Open (sPath & sFile) to open. when i step through the code called from the excel cell, i see it highlight the Workbooks.Open but it just doesnt execute. any ideas?
thanks,
Joe
Bookmarks