Thanks both,
I'd tried the quit before, but I think my IF statement was preventing the MyXl value from being set.When I get rid of it, the Quit function works correctly.
MD
Thanks both,
I'd tried the quit before, but I think my IF statement was preventing the MyXl value from being set.When I get rid of it, the Quit function works correctly.
MD
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'