|
▼こもれび さん:
丁寧に答えてくれてありがとうございます。
もうひとつ質問があります。すみません。
TextBox全部64個+オプションボタン(○男性○女性)男性だったら1女性ならば2を値をシート1へはいります。
オプションボタンの場合はどうやってコードを入れますか?
配列は4列目です。
1=男性
2=女性
右辺から左辺に変えるように
数値です。
> フォームのモジュール
Private Sub TextBox1_AfterUpdate()
TextData(0) = UserForm1.TextBox1.Text ' 氏名
End Sub
Private Sub TextBox2_AfterUpdate()
TextData(2) = UserForm1.TextBox2.Text ' 年齢
End Sub
Private Sub TextBox3_AfterUpdate()
TextData(1) = UserForm1.TextBox3.Text ' 社員番号
End Sub
Private Sub TextBox4_AfterUpdate()
TextData(3) = UserForm1.TextBox4.Text ' ID
End Sub
Private Sub TextBox5_AfterUpdate()
TextData(5) = UserForm1.TextBox5.Text ' A-1
End Sub
Private Sub TextBox6_AfterUpdate()
TextData(6) = UserForm1.TextBox6.Text ' A-2
End Sub
Private Sub TextBox7_AfterUpdate()
TextData(7) = UserForm1.TextBox7.Text ' A-3
End Sub
Private Sub TextBox8_AfterUpdate()
TextData(8) = UserForm1.TextBox8.Text ' A-4
End Sub
Private Sub TextBox9_AfterUpdate()
TextData(9) = UserForm1.TextBox9.Text ' A-5
End Sub
Private Sub TextBox10_AfterUpdate()
TextData(10) = UserForm1.TextBox10.Text ' A-6
End Sub
Private Sub TextBox11_AfterUpdate()
TextData(11) = UserForm1.TextBox11.Text ' A-7
End Sub
Private Sub TextBox12_AfterUpdate()
TextData(12) = UserForm1.TextBox12.Text ' A-8
End Sub
Private Sub TextBox13_AfterUpdate()
TextData(13) = UserForm1.TextBox13.Text ' A-9
End Sub
Private Sub TextBox14_AfterUpdate()
TextData(13) = UserForm1.TextBox14.Text ' A-10
End Sub
Private Sub TextBox15_AfterUpdate()
TextData(14) = UserForm1.TextBox15.Text ' A-11
End Sub
Private Sub TextBox16_AfterUpdate()
TextData(15) = UserForm1.TextBox16.Text ' A-12
End Sub
Private Sub TextBox17_AfterUpdate()
TextData(16) = UserForm1.TextBox17.Text ' A-13
End Sub
Private Sub TextBox18_AfterUpdate()
TextData(17) = UserForm1.TextBox18.Text ' A-14
End Sub
Private Sub TextBox19_AfterUpdate()
TextData(18) = UserForm1.TextBox19.Text ' A-15
End Sub
Private Sub TextBox20_AfterUpdate()
TextData(19) = UserForm1.TextBox20.Text ' A-16
End Sub
Private Sub TextBox21_AfterUpdate()
TextData(20) = UserForm1.TextBox21.Text ' A-17
End Sub
Private Sub TextBox22_AfterUpdate()
TextData(21) = UserForm1.TextBox22.Text ' B-1
End Sub
Private Sub TextBox23_AfterUpdate()
TextData(22) = UserForm1.TextBox23.Text ' B-2
End Sub
Private Sub TextBox24_AfterUpdate()
TextData(23) = UserForm1.TextBox24.Text ' B-3
End Sub
Private Sub TextBox25_AfterUpdate()
TextData(24) = UserForm1.TextBox25.Text ' B-4
End Sub
Private Sub TextBox26_AfterUpdate()
TextData(25) = UserForm1.TextBox26.Text ' B-5
End Sub
Private Sub TextBox27_AfterUpdate()
TextData(26) = UserForm1.TextBox27.Text ' B-6
End Sub
Private Sub TextBox28_AfterUpdate()
TextData(27) = UserForm1.TextBox28.Text ' B-7
End Sub
Private Sub TextBox29_AfterUpdate()
TextData(28) = UserForm1.TextBox29.Text ' B-8
End Sub
Private Sub TextBox30_AfterUpdate()
TextData(29) = UserForm1.TextBox30.Text ' B-9
End Sub
Private Sub TextBox31_AfterUpdate()
TextData(30) = UserForm1.TextBox31.Text ' B-10
End Sub
Private Sub TextBox32_AfterUpdate()
TextData(31) = UserForm1.TextBox32.Text ' B-11
End Sub
Private Sub TextBox33_AfterUpdate()
TextData(32) = UserForm1.TextBox33.Text ' B-12
End Sub
Private Sub TextBox34_AfterUpdate()
TextData(33) = UserForm1.TextBox34.Text ' B-13
End Sub
Private Sub TextBox35_AfterUpdate()
TextData(34) = UserForm1.TextBox35.Text ' B-14
End Sub
Private Sub TextBox36_AfterUpdate()
TextData(35) = UserForm1.TextBox12.Text ' B-15
End Sub
Private Sub TextBox37_AfterUpdate()
TextData(36) = UserForm1.TextBox37.Text ' B-16
End Sub
Private Sub TextBox38_AfterUpdate()
TextData(37) = UserForm1.TextBox38.Text ' B-17
End Sub
Private Sub TextBox39_AfterUpdate()
TextData(38) = UserForm1.TextBox39.Text ' B-18
End Sub
Private Sub TextBox40_AfterUpdate()
TextData(39) = UserForm1.TextBox40.Text ' B-19
End Sub
Private Sub TextBox41_AfterUpdate()
TextData(40) = UserForm1.TextBox41.Text ' B-20
End Sub
Private Sub TextBox42_AfterUpdate()
TextData(41) = UserForm1.TextBox42.Text ' B-21
End Sub
Private Sub TextBox43_AfterUpdate()
TextData(42) = UserForm1.TextBox43.Text ' B-22
End Sub
Private Sub TextBox44_AfterUpdate()
TextData(43) = UserForm1.TextBox44.Text ' B-23
End Sub
Private Sub TextBox45_AfterUpdate()
TextData(44) = UserForm1.TextBox45.Text ' B-24
End Sub
Private Sub TextBox46_AfterUpdate()
TextData(45) = UserForm1.TextBox46.Text ' B-25
End Sub
Private Sub TextBox47_AfterUpdate()
TextData(46) = UserForm1.TextBox47.Text ' B-26
End Sub
Private Sub TextBox48_AfterUpdate()
TextData(47) = UserForm1.TextBox48.Text ' B-27
End Sub
Private Sub TextBox49_AfterUpdate()
TextData(48) = UserForm1.TextBox49.Text ' B-28
End Sub
Private Sub TextBox50_AfterUpdate()
TextData(49) = UserForm1.TextBox50.Text ' B-29
End Sub
Private Sub TextBox51_AfterUpdate()
TextData(50) = UserForm1.TextBox51.Text ' C-1
End Sub
Private Sub TextBox52_AfterUpdate()
TextData(51) = UserForm1.TextBox52.Text ' C-2
End Sub
Private Sub TextBox53_AfterUpdate()
TextData(52) = UserForm1.TextBox53.Text ' C-3
End Sub
Private Sub TextBox54_AfterUpdate()
TextData(53) = UserForm1.TextBox54.Text ' C-4
End Sub
Private Sub TextBox55_AfterUpdate()
TextData(54) = UserForm1.TextBox55.Text ' C-5
End Sub
Private Sub TextBox56_AfterUpdate()
TextData(55) = UserForm1.TextBox56.Text ' C-6
End Sub
Private Sub TextBox57_AfterUpdate()
TextData(56) = UserForm1.TextBox57.Text ' C-7
End Sub
Private Sub TextBox58_AfterUpdate()
TextData(57) = UserForm1.TextBox58.Text ' C-8
End Sub
Private Sub TextBox59_AfterUpdate()
TextData(58) = UserForm1.TextBox59.Text ' C-9
End Sub
Private Sub TextBox60_AfterUpdate()
TextData(59) = UserForm1.TextBox60.Text ' D-1
End Sub
Private Sub TextBox61_AfterUpdate()
TextData(60) = UserForm1.TextBox61.Text ' D-2
End Sub
Private Sub CommandButton1_Click() '入力完了ボタン
Dim i As Integer
For i = 0 To 62
Cells(i + 1, 1) = TextData(i)
Next i
End Sub>
|
|