Refreshing the spreadsheet now works properly with the tabbedpane. Changes to the codes will now modify previously laid cells again.