Visual Basic - formulario de registros

Life is soft - evento anual de software empresarial
 
Vista:
Imágen de perfil de itzel ireri

formulario de registros

Publicado por itzel ireri (15 intervenciones) el 08/11/2016 16:39:26
Hola que tal buen dia

tengo una duda en un formulario que estoy realizando no me marca ningun error pero no me registra en las celsas correspondientes alguien me podria ayudar por favor porque no me registra en las celdas correspondientes

el codigo es el siguiente:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
rivate Sub ComboBox1_DropButtonClick()
ComboBox1.AddItem (" 01 Casting")
ComboBox1.AddItem (" 02 Machinning")
ComboBox1.AddItem (" 03 Assembly ")
ComboBox1.AddItem (" 04 Press")
ComboBox1.AddItem (" 05 Body")
ComboBox1.AddItem (" 06 Paint")
ComboBox1.AddItem (" 07 T&C")
 
 
 
 
 
 
 
 
End Sub
 
Private Sub ComboBox3_DropButtonClick()
 
ComboBox3.AddItem ("Quality")
ComboBox3.AddItem ("Cost")
ComboBox3.AddItem ("Time")
ComboBox3.AddItem ("Friendly Operation")
 
 
 
End Sub
 
 
 
 
Private Sub Image1_Click()
 
End Sub
 
 
 
 
Private Sub Label11_Click()
 
End Sub
 
Private Sub Label12_Click()
 
End Sub
 
Private Sub Label13_Click()
 
End Sub
 
Private Sub Label14_click()
 
 
End Sub
 
Private Sub Label5_Click()
 
End Sub
 
Private Sub Label7_Click()
 
End Sub
 
Private Sub OptionButton1_Click()
 If OptionButton1.Value = True Then Range("k6:k1000").Value = 1
End Sub
 
Private Sub TextBox2_Change()
 
End Sub
 
Private Sub TextBox2_Enter()
 
End Sub
 
Private Sub TextBox3_Change()
 
End Sub
 
Private Sub TextBox4_Change()
 
End Sub
 
 
 
Private Sub ComboBox2_DropButtonClick()
 
ComboBox2.AddItem ("A1")
ComboBox2.AddItem ("A2")
ComboBox2.AddItem ("CVC")
ComboBox2.AddItem ("PWT")
 
End Sub
 
Private Sub CommandButton1_Click()
If ComboBox2.Text <> "" And _
   ComboBox1.Text <> "" And ComboBox3.Text <> "" And TextBox2.Text <> "" And TextBox3.Text <> "" And TextBox4.Text <> "" And TextBox5.Text <> "" Then
 Call Graba
 
Else
 
MsgBox "Debe llenar todos los datos"
End If
End Sub
 
 
 
Private Sub Label1_Click()
 
End Sub
 
Private Sub Label10_Click()
 
End Sub
 
Private Sub Label2_Click()
 
End Sub
 
Private Sub Label4_Click()
 
End Sub
 
Sub Graba()
        Sheets("new").Select
 
ult = Cells(Rows.Count, 7).End(xlUp).Row
 
'Plant
 
        Cells(ult + 1, 14).Value = ComboBox2.Text
'Shop
        Cells(ult + 1, 15).Value = ComboBox1.Text
'KPI
        Cells(ult + 1, 16).Value = ComboBox3.Text
 
'Title Of invention
 
        Cells(ult + 1, 17).Value = TextBox2.Text
'Responsible
        Cells(ult + 1, 18).Value = TextBox3.Text
'Direct Boss
        Cells(ult + 1, 19).Value = TextBox5.Text
'Desciption
        Cells(ult + 1, 20).Value = TextBox4.Text
 
 
 
 
   ult = ult + 1
 
 
        ComboBox2.Text = ""
        ComboBox1.Text = ""
        ComboBox3.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox5.Text = ""
        TextBox4.Text = ""
 
 
End Sub
 
Private Sub CommandButton2_Click()
 
Unload UserForm2
 
End Sub
 
Private Sub Label6_Click()
 
End Sub
 
Private Sub TextBox5_Change()
 
End Sub
 
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 7 Then
Cells(Target.Row, 7).Value = Now
End If
 
 
End Sub
 
Private Sub TextBox6_Change()
 
End Sub
 
Private Sub UserForm_Click()
 
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder