Hi, I cannot get the last item from my selection. Coding in VBA drives my crazy. There might by severar errors in the following short code. Thank you for your help.
Option Base 1 Sub test() Dim Ranko As Integer LastItem As Date ' not sure if this is a correct declaration Sheets("SCHEDULE").Range("E5:E12").Select' my selection of some dates Ranko = Selection.Count ' counts the cells in selection Dim AllTimeArr(Ranko) As Variant AllTimeArr = Selection 'should assign the selection to the array LastItem = AllTimeArr(Ranko) 'should get the last member from array End Sub