Private Sub Command1_Click()
Dim StrName as String
Open App.Path & "\srdat.Txt" for OutPut as #1
Print #1,"样品型号 " & Text1(0).Text
Print #1,"存样仓库 " & Combo1.Text
Print #1,"样品材料 " & Combo2.Text
Print #1,"样品数量 " & Text1(1).Text
If Option1.Value = True then
Print #1,"样品描述 " & Option1.Caption & ", 长 = " & Text1(2).Text & ";宽 = ” & Text1(3).Text & ";高 = ” & Text1(4).Text
Else
Print #1,"样品描述 " & Option2.Caption & ", 长 = " & Text1(2).Text & ";宽 = ” & Text1(3).Text & ";高 = ” & Text1(4).Text
Endif
For i = 0 to 3
If Check(i).Value = 1 then
StrName = StrName & Check(i).Caption & ","
endif
Next i
StrName = Left(StrName,Len(StrName)-1)
Print #1,StrName
Close #1
End Sub