When I'm debugging the program,cFileName has the value plus several lines that look like "| || || || || || || || |" trailing the data. I attempted to do a Trim$ but it still had that. I was attempting to do a Right$ on the return value to check for the extension but the "if" keeps failing because of all of the spaces after the data. Is there a way to prevent this? Like I said earlier, it has something to do with the MAX_ constant in the declaration but I can't find a way around it.