it is declared as a public in a module. it is being used on in 2 possible areas depending on what is selected. but both selections lead to the same code, just one is being pulled from SQL to Excel then at one time to the flexgrid. and the other is just any Excel file.