i think i found a small bug. i created a class cMachine and when i write code IDE auto-correct the name to CMachine instead cMachine. Private hCompressor As CMachine Public Sub btnCreateObject_Click() hCompressor = New CMachine End -- Regards, Demosthenes Koptsis.