I'm trying to change a subroutine that I've been using for a while into a function, so that it can be called directly rather than from a separate subroutine. Here's what I have at the moment:
The problem is that when I run the Workbooks.open method from the function, it doesn't do anything. It loads all the property data for the file into wbTelcom, but the file doesn't open up, and the object seems to refer back to ThisWorkbook instead.![]()
Please Login or Register to view this content.
This only seems to be a problem if I enter macro processing through the function; if I use a command button that calls a standard subroutine with the method called there, it works fine. Is it some sort of problem with trying to call the method from a function? Or did I screw up the syntax somewhere?
Bookmarks