Ivax,<br><br>Not sure... tried it at home and it seems to work. Like you, defined a UDT in a module then created a new variable based on the UDT in my form<br><br>ie.<br>Option Explicit<br><br>Public Type client<br> codbar As String * 13<br> client As String * 20<br> name As String * 40<br>End Type<br><br>Then in the form_load I put <br><br>Dim myclient As client<br><br>Open "c:\test.txt" For Random As #1<br><br>With myclient<br> .codbar = 13<br> .client = "123456789"<br> .name = "Test"<br>End With<br><br>Put #1, , myclient<br><br>opened it in wordpad and in DOS and it looked correct that is to say, that the codbar was 13 bytes, client was 20 bytes and the name was 40.