回答編集履歴
2
追記
test
CHANGED
@@ -55,3 +55,61 @@
|
|
55
55
|
|小麦粉|g|150|・・・|
|
56
56
|
|
57
57
|
|水|mL|500|・・・|
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
---
|
62
|
+
|
63
|
+
<追記>
|
64
|
+
|
65
|
+
無茶ぶりには同情しますが、さすがにゼロから全部作ってさしあげるのはサイトの趣旨から外れるので
|
66
|
+
|
67
|
+
ヒントにとどめます。
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
```VBA
|
72
|
+
|
73
|
+
Private Sub CommandButton1_Click()
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
With ThisWorkbook.Worksheets(1).UsedRange
|
78
|
+
|
79
|
+
Dim i
|
80
|
+
|
81
|
+
For i = 3 To .Columns.Count
|
82
|
+
|
83
|
+
If .Cells(1, i) = Me.TextBox1.Text And .Cells(2, i) = Me.TextBox2.Text And .Cells(3, i) = Me.TextBox3.Text And .Cells(4, i) = Me.TextBox4.Text Then
|
84
|
+
|
85
|
+
Me.ComboBox1.SelText = .Cells(6, 1)
|
86
|
+
|
87
|
+
Me.ComboBox2.SelText = .Cells(6, 2)
|
88
|
+
|
89
|
+
Me.ComboBox3.SelText = .Cells(6, i)
|
90
|
+
|
91
|
+
Me.ComboBox4.SelText = .Cells(7, 1)
|
92
|
+
|
93
|
+
Me.ComboBox5.SelText = .Cells(7, 2)
|
94
|
+
|
95
|
+
Me.ComboBox6.SelText = .Cells(7, i)
|
96
|
+
|
97
|
+
Exit Sub
|
98
|
+
|
99
|
+
End If
|
100
|
+
|
101
|
+
Next
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
MsgBox "新規登録"
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
End With
|
110
|
+
|
111
|
+
End Sub
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
```
|
1
追記
test
CHANGED
@@ -25,3 +25,33 @@
|
|
25
25
|
|小麦粉|g|150|・・・|
|
26
26
|
|
27
27
|
|水|mL|500|・・・|
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
---
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
<追記> あ、こんな感じ?
|
36
|
+
|
37
|
+
|A|B|C|D|
|
38
|
+
|
39
|
+
|:--|:--|:--|:--|
|
40
|
+
|
41
|
+
|客先名|-|A様|B様|・・・||
|
42
|
+
|
43
|
+
|品名1|-|ピザ|・・・|||
|
44
|
+
|
45
|
+
|品名2|-|マルゲリータ|・・・|||
|
46
|
+
|
47
|
+
|グレード|-|Lサイズ|・・・|||
|
48
|
+
|
49
|
+
|<原材料>|<単位>
|
50
|
+
|
51
|
+
|砂糖|g|100|・・・|
|
52
|
+
|
53
|
+
|塩|g|20|・・・|
|
54
|
+
|
55
|
+
|小麦粉|g|150|・・・|
|
56
|
+
|
57
|
+
|水|mL|500|・・・|
|