@BruceS Thankyou works @Gianluigi when I had Dim class1 As New Class1 it still didn't seem to work, but when I tried Dim myClass1 as New Class1 it was fine many thanks K -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210616/e57b5316/attachment.htm>