Category Archives: Coding Snipbits

Excel VBA reminders / snipbits

Consider using Collections, not arrays Use SET when assigning Objects Selec All Code:1 Set InvoiceWS = ActiveWorkbook.Sheets("Invoice") Selec All Code:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Function InArray(arr, val) As Boolean    For arrloop = LBound(arr) To UBound(arr)       If arr(arrloop) = val Then         InArray =… Read More »

Delphi Validating UK postcodes

http://www.daniweb.com/software-development/pascal-and-delphi/threads/276733/postcode-validation http://www.ml-consult.co.uk/foxst-39.htm Selec All Code:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 function ValidPostcode(anInput: String): Boolean; var iSpacePos, I: byte; sInward, sOutward: String; begin Result := False; if (anInput =… Read More »