Forums/Keytime SME customer area/Pastel Partner and Pastel Xpress

Runtime Error 9 - Subscript out of range

Steve K
posted this on 11 January 2011 10:16

Solving the Runtime Error 9

I have listed a few suggestions that you may try to resolve this error:

1.    Ensure that you run a backup before following any of the steps below.

2.    Refresh the customer account

2.1.    Go to ‘Edit – Customer – Account’ in the processing tab, change the tax processing method from Inclusive to Exclusive. If it is Exclusive then change it to Inclusive.  Once that is done Save changes and close that screen.
2.2.    Now go back to ‘Edit – Customer – Account’ in the processing tab, change the method back to the original.  You have now refreshed the customer account, save the changes and test the report again.

3.    Delete defaults and controls.

3.1.    Close / Exit Pastel (and make sure all other users close / exit Pastel if the Pastel program is being run in a multi-user environment)
3.2.    Click on Start... Find / Search... For Files or Folders
3.3.    In the Named field type accdflt.00*, acccntrl.00*
3.4.    Click on Browse, locate and select the company (database) folder – i.e. C:\Pastelxx\Company name, and then click on OK            
3.5.    Then click on Find/ Search Now
3.6.    Upon finding the files, simply highlight all of them (press Ctrl+A), and delete them

4.    Rebuild the acchisth.dat and acchistl.dat files

4.1.    Go to ‘Start – All Programs – Softline Pastel – Pastel Partner 2007 – Rebuild Utility’
4.2.    Double click on the yellow company directory in the top half
4.3.    Select the acchisth.dat and acchistl.dat files:
4.4.    Click on Rebuild. Ensure that all records are rebuilt and you get no errors:

5.    The batch could be corrupt in which case you need to export the batch, delete it and import it.
5.1.    Create a copy company
5.2.    NB.: When you export an invoice batch you will lose those exact document numbers. When you import the batch again, all invoices will have new document numbers.
5.3.    Click on Batch then Export
5.4.    Click on the magnifying glass
5.5.    Click on Desktop on the Left-hand side and put in a file name i.e. invoicebatch.csv then click on Save and Process.
5.6.    You should see the following message:
5.7.    Now click on Delete/Insert and select ‘Delete Whole Batch’
5.8.    We can now import the batch by doing the following, Click on Batch and Import. Click on the magnifying glass.
5.9.    Click on Desktop on the Left-hand side and select the invoicebatch.csv from your desktop files. Click on Open and Process.
5.10.    You should now see the following message: Invoice(s) have been imported
5.11.    Test again to check if you get the error again.

6.    Should the above fail, check for blank invoice lines in 1 of the documents within the batch:
6.1.    This is what you will do:Open each invoice (load it to screen), then check that all lines are fully furnished, i.e. check if the line has an Item Code, then a Qty, and lastly ensure that a price is selected.

If you're still having a problem, please get into contact.