where is your sheetname() function... if it's in a module...you might should define it with the public keyword, not sure I'll have to play with it... let me know how/where it's defined