Can you help me to shorten this code? Thanks a lot

saftawy1

Board Regular
Joined
Oct 12, 2021
Messages
65
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
VBA Code:
If Tex1 <> "" Then
Application.ScreenUpdating = False
On Error Resume Next
With ThisWorkbook.Sheets("statment")
.Range("d8").Value = Tex1.Value
.Range("d9").Value = Tex2.Value
.Range("d10").Value = Tex3.Value
.Range("d11").Value = Tex4.Value
.Range("h8").Value = Tex5.Value
.Range("h9").Value = Tex6.Value
.Range("h10").Value = Tex7.Value
.Range("h11").Value = Tex8.Value
.Range("p8").Value = Tex9.Value
.Range("p9").Value = Tex10.Value
.Range("l8").Value = Tex11.Value
.Range("l9").Value = Tex12.Value
.Range("l10").Value = Tex13.Value
.Range("p10").Value = Tex14.Value
.Range("p11").Value = Tex15.Value
.Range("l11").Value = Tex16.Value
.Range("d12").Value = Tex17.Value
.Range("d13").Value = Tex18.Value
.Range("d14").Value = Tex19.Value
.Range("l12").Value = Tex20.Value
.Range("p12").Value = Tex21.Value
'...........................................
.Range("s8").Value = Tex22.Value
.Range("s9").Value = Tex23.Value
.Range("s10").Value = Tex24.Value
.Range("s11").Value = Tex25.Value
.Range("s12").Value = Tex26.Value
.Range("s13").Value = Tex27.Value
.Range("s14").Value = Tex28.Value
'...........................................
.Range("l13").Value = Tex29.Value
'.Range("").Value = Tex30.Value
'.Range("").Value = Tex31.Value
'.Range("").Value = Tex32.Value
'.Range("").Value = Tex33.Value
'.Range("").Value = Tex34.Value
.Range("l15").Value = Tex35.Value
.Range("m15").Value = Tex36.Value
.Range("n15").Value = Tex37.Value
'...........................................
.Range("b17").Value = Tex38.Value
.Range("c17").Value = Tex39.Value
'...........................................
.Range("g17").Value = Tex40.Value
.Range("h17").Value = Tex41.Value
.Range("i17").Value = Tex42.Value
.Range("j17").Value = Tex43.Value
.Range("k17").Value = Tex44.Value
.Range("l17").Value = Tex45.Value
.Range("m17").Value = Tex46.Value
.Range("n17").Value = Tex47.Value
.Range("o17").Value = Tex48.Value
.Range("p17").Value = Tex49.Value
.Range("q17").Value = Tex50.Value
.Range("r17").Value = Tex51.Value
.Range("s17").Value = Tex52.Value
'...........................................
.Range("b18").Value = Tex53.Value
.Range("c18").Value = Tex54.Value
'...........................................
.Range("g18").Value = Tex55.Value
.Range("h18").Value = Tex56.Value
.Range("i18").Value = Tex57.Value
.Range("j18").Value = Tex58.Value
.Range("k18").Value = Tex59.Value
.Range("l18").Value = Tex60.Value
.Range("m18").Value = Tex61.Value
.Range("n18").Value = Tex62.Value
.Range("o18").Value = Tex63.Value
.Range("p18").Value = Tex64.Value
.Range("q18").Value = Tex65.Value
.Range("r18").Value = Tex66.Value
.Range("s18").Value = Tex67.Value
'...........................................
.Range("b19").Value = Tex68.Value
.Range("c19").Value = Tex69.Value
'...........................................
.Range("g19").Value = Tex70.Value
.Range("h19").Value = Tex71.Value
.Range("i19").Value = Tex72.Value
.Range("j19").Value = Tex73.Value
.Range("k19").Value = Tex74.Value
.Range("l19").Value = Tex75.Value
.Range("m19").Value = Tex76.Value
.Range("n19").Value = Tex77.Value
.Range("o19").Value = Tex78.Value
.Range("p19").Value = Tex79.Value
.Range("q19").Value = Tex80.Value
.Range("r19").Value = Tex81.Value
.Range("s19").Value = Tex82.Value
'...........................................
.Range("b20").Value = Tex83.Value
.Range("c20").Value = Tex84.Value
'...........................................
.Range("g20").Value = Tex85.Value
.Range("h20").Value = Tex86.Value
.Range("i20").Value = Tex87.Value
.Range("j20").Value = Tex88.Value
.Range("k20").Value = Tex89.Value
.Range("l20").Value = Tex90.Value
.Range("m20").Value = Tex91.Value
.Range("n20").Value = Tex92.Value
.Range("o20").Value = Tex93.Value
.Range("p20").Value = Tex94.Value
.Range("q20").Value = Tex95.Value
.Range("r20").Value = Tex96.Value
.Range("s20").Value = Tex97.Value
'...........................................
.Range("b21").Value = Tex98.Value
.Range("c21").Value = Tex99.Value
'...........................................
.Range("g21").Value = Tex100.Value
.Range("h21").Value = Tex101.Value
.Range("i21").Value = Tex102.Value
.Range("j21").Value = Tex103.Value
.Range("k21").Value = Tex104.Value
.Range("l21").Value = Tex105.Value
.Range("m21").Value = Tex106.Value
.Range("n21").Value = Tex107.Value
.Range("o21").Value = Tex108.Value
.Range("p21").Value = Tex109.Value
.Range("q21").Value = Tex110.Value
.Range("r21").Value = Tex111.Value
.Range("s21").Value = Tex112.Value
'...........................................
.Range("b22").Value = Tex113.Value
.Range("c22").Value = Tex114.Value
'...........................................
.Range("g22").Value = Tex115.Value
.Range("h22").Value = Tex116.Value
.Range("i22").Value = Tex117.Value
.Range("j22").Value = Tex118.Value
.Range("k22").Value = Tex119.Value
.Range("l22").Value = Tex120.Value
.Range("m22").Value = Tex121.Value
.Range("n22").Value = Tex122.Value
.Range("o22").Value = Tex123.Value
.Range("p22").Value = Tex124.Value
.Range("q22").Value = Tex125.Value
.Range("r22").Value = Tex126.Value
.Range("s22").Value = Tex127.Value
'...........................................
.Range("b23").Value = Tex128.Value
.Range("c23").Value = Tex129.Value
'...........................................
.Range("g23").Value = Tex130.Value
.Range("h23").Value = Tex131.Value
.Range("i23").Value = Tex132.Value
.Range("j23").Value = Tex133.Value
.Range("k23").Value = Tex134.Value
.Range("l23").Value = Tex135.Value
.Range("m23").Value = Tex136.Value
.Range("n23").Value = Tex137.Value
.Range("o23").Value = Tex138.Value
.Range("p23").Value = Tex139.Value
.Range("q23").Value = Tex140.Value
.Range("r23").Value = Tex141.Value
.Range("s23").Value = Tex142.Value
'...........................................
.Range("b24").Value = Tex143.Value
.Range("c24").Value = Tex144.Value
'...........................................
.Range("g24").Value = Tex145.Value
.Range("h24").Value = Tex146.Value
.Range("i24").Value = Tex147.Value
.Range("j24").Value = Tex148.Value
.Range("k24").Value = Tex149.Value
.Range("l24").Value = Tex150.Value
.Range("m24").Value = Tex151.Value
.Range("n24").Value = Tex152.Value
.Range("o24").Value = Tex153.Value
.Range("p24").Value = Tex154.Value
.Range("q24").Value = Tex155.Value
.Range("r24").Value = Tex156.Value
.Range("s24").Value = Tex157.Value
'...........................................
.Range("b25").Value = Tex158.Value
.Range("c25").Value = Tex159.Value
'...........................................
.Range("g25").Value = Tex160.Value
.Range("h25").Value = Tex161.Value
.Range("i25").Value = Tex162.Value
.Range("j25").Value = Tex163.Value
.Range("k25").Value = Tex164.Value
.Range("l25").Value = Tex165.Value
.Range("m25").Value = Tex166.Value
.Range("n25").Value = Tex167.Value
.Range("o25").Value = Tex168.Value
.Range("p25").Value = Tex169.Value
.Range("q25").Value = Tex170.Value
.Range("r25").Value = Tex171.Value
.Range("s25").Value = Tex172.Value
'...........................................
.Range("b26").Value = Tex173.Value
.Range("c26").Value = Tex174.Value
'...........................................
.Range("g26").Value = Tex175.Value
.Range("h26").Value = Tex176.Value
.Range("i26").Value = Tex177.Value
.Range("j26").Value = Tex178.Value
.Range("k26").Value = Tex179.Value
.Range("l26").Value = Tex180.Value
.Range("m26").Value = Tex181.Value
.Range("n26").Value = Tex182.Value
.Range("o26").Value = Tex183.Value
.Range("p26").Value = Tex184.Value
.Range("q26").Value = Tex185.Value
.Range("r26").Value = Tex186.Value
.Range("s26").Value = Tex187.Value
'...........................................
.Range("b27").Value = Tex188.Value
.Range("c27").Value = Tex189.Value
'...........................................
.Range("g27").Value = Tex190.Value
.Range("h27").Value = Tex191.Value
.Range("i27").Value = Tex192.Value
.Range("j27").Value = Tex193.Value
.Range("k27").Value = Tex194.Value
.Range("l27").Value = Tex195.Value
.Range("m27").Value = Tex196.Value
.Range("n27").Value = Tex197.Value
.Range("o27").Value = Tex198.Value
.Range("p27").Value = Tex199.Value
.Range("q27").Value = Tex200.Value
.Range("r27").Value = Tex201.Value
.Range("s27").Value = Tex202.Value
'...........................................
.Range("b28").Value = Tex203.Value
.Range("c28").Value = Tex204.Value
'...........................................
.Range("g28").Value = Tex205.Value
.Range("h28").Value = Tex206.Value
.Range("i28").Value = Tex207.Value
.Range("j28").Value = Tex208.Value
.Range("k28").Value = Tex209.Value
.Range("l28").Value = Tex210.Value
.Range("m28").Value = Tex211.Value
.Range("n28").Value = Tex212.Value
.Range("o28").Value = Tex213.Value
.Range("p28").Value = Tex214.Value
.Range("q28").Value = Tex215.Value
.Range("r28").Value = Tex216.Value
.Range("s28").Value = Tex217.Value
'...........................................
.Range("b29").Value = Tex218.Value
.Range("c29").Value = Tex219.Value
'...........................................
.Range("g29").Value = Tex220.Value
.Range("h29").Value = Tex221.Value
.Range("i29").Value = Tex222.Value
.Range("j29").Value = Tex223.Value
.Range("k29").Value = Tex224.Value
.Range("l29").Value = Tex225.Value
.Range("m29").Value = Tex226.Value
.Range("n29").Value = Tex227.Value
.Range("o29").Value = Tex228.Value
.Range("p29").Value = Tex229.Value
.Range("q29").Value = Tex230.Value
.Range("r29").Value = Tex231.Value
.Range("s29").Value = Tex232.Value
'...........................................
.Range("b30").Value = Tex233.Value
.Range("c30").Value = Tex234.Value
'...........................................
.Range("g30").Value = Tex235.Value
.Range("h30").Value = Tex236.Value
.Range("i30").Value = Tex237.Value
.Range("j30").Value = Tex238.Value
.Range("k30").Value = Tex239.Value
.Range("l30").Value = Tex240.Value
.Range("m30").Value = Tex241.Value
.Range("n30").Value = Tex242.Value
.Range("o30").Value = Tex243.Value
.Range("p30").Value = Tex244.Value
.Range("q30").Value = Tex245.Value
.Range("r30").Value = Tex246.Value
.Range("s30").Value = Tex247.Value
'...........................................
.Range("b31").Value = Tex248.Value
.Range("c31").Value = Tex249.Value
'...........................................
.Range("g31").Value = Tex250.Value
.Range("h31").Value = Tex251.Value
.Range("i31").Value = Tex252.Value
.Range("j31").Value = Tex253.Value
.Range("k31").Value = Tex254.Value
.Range("l31").Value = Tex255.Value
.Range("m31").Value = Tex256.Value
.Range("n31").Value = Tex257.Value
.Range("o31").Value = Tex258.Value
.Range("p31").Value = Tex259.Value
.Range("q31").Value = Tex260.Value
.Range("r31").Value = Tex261.Value
.Range("s31").Value = Tex262.Value
'...........................................
.Range("b32").Value = Tex263.Value
.Range("c32").Value = Tex264.Value
'...........................................
.Range("g32").Value = Tex265.Value
.Range("h32").Value = Tex266.Value
.Range("i32").Value = Tex267.Value
.Range("j32").Value = Tex268.Value
.Range("k32").Value = Tex269.Value
.Range("l32").Value = Tex270.Value
.Range("m32").Value = Tex271.Value
.Range("n32").Value = Tex272.Value
.Range("o32").Value = Tex273.Value
.Range("p32").Value = Tex274.Value
.Range("q32").Value = Tex275.Value
.Range("r32").Value = Tex276.Value
.Range("s32").Value = Tex277.Value
'...........................................
.Range("g33").Value = Tex401.Value
.Range("h33").Value = Tex402.Value
.Range("i33").Value = Tex403.Value
.Range("j33").Value = Tex404.Value
.Range("k33").Value = Tex405.Value
.Range("l33").Value = Tex406.Value
.Range("m33").Value = Tex407.Value
.Range("n33").Value = Tex408.Value
.Range("o33").Value = Tex409.Value
.Range("p33").Value = Tex410.Value
.Range("q33").Value = Tex411.Value
.Range("r33").Value = Tex412.Value
.Range("s33").Value = Tex413.Value
'...........................................
.Range("k34").Value = Tex414.Value
Application.ScreenUpdating = True
  On Error GoTo 0
End With
End If
MsgBox "done"

Dim X
For Each X In Me.Controls
If TypeOf X Is MSForms.TextBox Then
X.Text = ""
End If
Next X

Call print_statment

Application.ScreenUpdating = True
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
You could shorten with loops but will need more than one because the textbox name/numbering and cell references are not consecutive. Something like

VBA Code:
With ThisWorkbook.Sheets("statment") '<<statement?
'one example of a loop section. You would need several, and some blocks of code just might not be adaptable at all.
  n = 103
  For i = 40 to 52
    .Range(asc(n)& "17").Value = (Tex & i).Value '<<not sure about the parentheses. Asc(103) is "g"
    n = n+1
  Next
 
Upvote 0
You could shorten with loops but will need more than one because the textbox name/numbering and cell references are not consecutive. Something like

VBA Code:
With ThisWorkbook.Sheets("statment") '<<statement?
'one example of a loop section. You would need several, and some blocks of code just might not be adaptable at all.
  n = 103
  For i = 40 to 52
    .Range(asc(n)& "17").Value = (Tex & i).Value '<<not sure about the parentheses. Asc(103) is "g"
    n = n+1
  Next
syntax error
 

Attachments

  • Capture.JPG
    Capture.JPG
    40.9 KB · Views: 7
Upvote 0
Hi very much untested but try following

VBA Code:
Sub SaveToRange()
    Dim wsStatement As Worksheet, wsControlRange As Worksheet
    Dim ControlArr  As Variant
    Dim i           As Long
   
    With ThisWorkbook
        Set wsStatement = .Worksheets("statement")
        Set wsControlRange = .Worksheets("Control Range")
    End With
   
    With wsControlRange
        ControlArr = .UsedRange.Value2
        .Visible = xlSheetVeryHidden
    End With
   
    Application.ScreenUpdating = False
    For i = 1 To UBound(ControlArr, 1)
        With Me.Controls(ControlArr(i, 2))
            wsStatement.Range(ControlArr(i, 1)).Value = .Value
            'clear textbox
            .Value = ""
        End With
    Next i
   
    Application.ScreenUpdating = True
   
    MsgBox "Record Saved", 64, "All done"
   
    Call print_statment
   
End Sub

You will need to copy this workheet to your project & name it Control Range

18-05-2022.xls
AB
1d8tx1
2d9tx2
3d10tx3
4d11tx4
5h8tx5
6h9tx6
7h10tx7
8h11tx8
9p8tx9
10p9tx10
11l8tx11
12l9tx12
13l10tx13
14p10tx14
15p11tx15
16l11tx16
17d12tx17
18d13tx18
19d14tx19
20l12tx20
21p12tx21
22s8tx22
23s9tx23
24s10tx24
25s11tx25
26s12tx26
27s13tx27
28s14tx28
29l13tx29
30l15tx35
31m15tx36
32n15tx37
33b17tx38
34c17tx39
35g17tx40
36h17tx41
37i17tx42
38j17tx43
39k17tx44
40l17tx45
41m17tx46
42n17tx47
43o17tx48
44p17tx49
45q17tx50
46r17tx51
47s17tx52
48b18tx53
49c18tx54
50g18tx55
51h18tx56
52i18tx57
53j18tx58
54k18tx59
55l18tx60
56m18tx61
57n18tx62
58o18tx63
59p18tx64
60q18tx65
61r18tx66
62s18tx67
63b19tx68
64c19tx69
65g19tx70
66h19tx71
67i19tx72
68j19tx73
69k19tx74
70l19tx75
71m19tx76
72n19tx77
73o19tx78
74p19tx79
75q19tx80
76r19tx81
77s19tx82
78b20tx83
79c20tx84
80g20tx85
81h20tx86
82i20tx87
83j20tx88
84k20tx89
85l20tx90
86m20tx91
87n20tx92
88o20tx93
89p20tx94
90q20tx95
91r20tx96
92s20tx97
93b21tx98
94c21tx99
95g21tx100
96h21tx101
97i21tx102
98j21tx103
99k21tx104
100l21tx105
101m21tx106
102n21tx107
103o21tx108
104p21tx109
105q21tx110
106r21tx111
107s21tx112
108b22tx113
109c22tx114
110g22tx115
111h22tx116
112i22tx117
113j22tx118
114k22tx119
115l22tx120
116m22tx121
117n22tx122
118o22tx123
119p22tx124
120q22tx125
121r22tx126
122s22tx127
123b23tx128
124c23tx129
125g23tx130
126h23tx131
127i23tx132
128j23tx133
129k23tx134
130l23tx135
131m23tx136
132n23tx137
133o23tx138
134p23tx139
135q23tx140
136r23tx141
137s23tx142
138b24tx143
139c24tx144
140g24tx145
141h24tx146
142i24tx147
143j24tx148
144k24tx149
145l24tx150
146m24tx151
147n24tx152
148o24tx153
149p24tx154
150q24tx155
151r24tx156
152s24tx157
153b25tx158
154c25tx159
155g25tx160
156h25tx161
157i25tx162
158j25tx163
159k25tx164
160l25tx165
161m25tx166
162n25tx167
163o25tx168
164p25tx169
165q25tx170
166r25tx171
167s25tx172
168b26tx173
169c26tx174
170g26tx175
171h26tx176
172i26tx177
173j26tx178
174k26tx179
175l26tx180
176m26tx181
177n26tx182
178o26tx183
179p26tx184
180q26tx185
181r26tx186
182s26tx187
183b27tx188
184c27tx189
185g27tx190
186h27tx191
187i27tx192
188j27tx193
189k27tx194
190l27tx195
191m27tx196
192n27tx197
193o27tx198
194p27tx199
195q27tx200
196r27tx201
197s27tx202
198b28tx203
199c28tx204
200g28tx205
201h28tx206
202i28tx207
203j28tx208
204k28tx209
205l28tx210
206m28tx211
207n28tx212
208o28tx213
209p28tx214
210q28tx215
211r28tx216
212s28tx217
213b29tx218
214c29tx219
215g29tx220
216h29tx221
217i29tx222
218j29tx223
219k29tx224
220l29tx225
221m29tx226
222n29tx227
223o29tx228
224p29tx229
225q29tx230
226r29tx231
227s29tx232
228b30tx233
229c30tx234
230g30tx235
231h30tx236
232i30tx237
233j30tx238
234k30tx239
235l30tx240
236m30tx241
237n30tx242
238o30tx243
239p30tx244
240q30tx245
241r30tx246
242s30tx247
243b31tx248
244c31tx249
245g31tx250
246h31tx251
247i31tx252
248j31tx253
249k31tx254
250l31tx255
251m31tx256
252n31tx257
253o31tx258
254p31tx259
255q31tx260
256r31tx261
257s31tx262
258b32tx263
259c32tx264
260g32tx265
261h32tx266
262i32tx267
263j32tx268
264k32tx269
265l32tx270
266m32tx271
267n32tx272
268o32tx273
269p32tx274
270q32tx275
271r32tx276
272s32tx277
273g33tx401
274h33tx402
275i33tx403
276j33tx404
277k33tx405
278l33tx406
279m33tx407
280n33tx408
281o33tx409
282p33tx410
283q33tx411
284r33tx412
285s33tx413
286k34tx414
Control Range


Dave
 
Last edited:
Upvote 0
Solution
My mistake (at least one of them) was using Asc when I should have posted Chr

.Range(Chr(103) & 17).Value = (Tex & i).Value
 
Upvote 0
Hi very much untested but try following

VBA Code:
Sub SaveToRange()
    Dim wsStatement As Worksheet, wsControlRange As Worksheet
    Dim ControlArr  As Variant
    Dim i           As Long
  
    With ThisWorkbook
        Set wsStatement = .Worksheets("statement")
        Set wsControlRange = .Worksheets("Control Range")
    End With
  
    With wsControlRange
        ControlArr = .UsedRange.Value2
        .Visible = xlSheetVeryHidden
    End With
  
    Application.ScreenUpdating = False
    For i = 1 To UBound(ControlArr, 1)
        With Me.Controls(ControlArr(i, 2))
            wsStatement.Range(ControlArr(i, 1)).Value = .Value
            'clear textbox
            .Value = ""
        End With
    Next i
  
    Application.ScreenUpdating = True
  
    MsgBox "Record Saved", 64, "All done"
  
    Call print_statment
  
End Sub

You will need to copy this workheet to your project & name it Control Range

18-05-2022.xls
AB
1d8tx1
2d9tx2
3d10tx3
4d11tx4
5h8tx5
6h9tx6
7h10tx7
8h11tx8
9p8tx9
10p9tx10
11l8tx11
12l9tx12
13l10tx13
14p10tx14
15p11tx15
16l11tx16
17d12tx17
18d13tx18
19d14tx19
20l12tx20
21p12tx21
22s8tx22
23s9tx23
24s10tx24
25s11tx25
26s12tx26
27s13tx27
28s14tx28
29l13tx29
30l15tx35
31m15tx36
32n15tx37
33b17tx38
34c17tx39
35g17tx40
36h17tx41
37i17tx42
38j17tx43
39k17tx44
40l17tx45
41m17tx46
42n17tx47
43o17tx48
44p17tx49
45q17tx50
46r17tx51
47s17tx52
48b18tx53
49c18tx54
50g18tx55
51h18tx56
52i18tx57
53j18tx58
54k18tx59
55l18tx60
56m18tx61
57n18tx62
58o18tx63
59p18tx64
60q18tx65
61r18tx66
62s18tx67
63b19tx68
64c19tx69
65g19tx70
66h19tx71
67i19tx72
68j19tx73
69k19tx74
70l19tx75
71m19tx76
72n19tx77
73o19tx78
74p19tx79
75q19tx80
76r19tx81
77s19tx82
78b20tx83
79c20tx84
80g20tx85
81h20tx86
82i20tx87
83j20tx88
84k20tx89
85l20tx90
86m20tx91
87n20tx92
88o20tx93
89p20tx94
90q20tx95
91r20tx96
92s20tx97
93b21tx98
94c21tx99
95g21tx100
96h21tx101
97i21tx102
98j21tx103
99k21tx104
100l21tx105
101m21tx106
102n21tx107
103o21tx108
104p21tx109
105q21tx110
106r21tx111
107s21tx112
108b22tx113
109c22tx114
110g22tx115
111h22tx116
112i22tx117
113j22tx118
114k22tx119
115l22tx120
116m22tx121
117n22tx122
118o22tx123
119p22tx124
120q22tx125
121r22tx126
122s22tx127
123b23tx128
124c23tx129
125g23tx130
126h23tx131
127i23tx132
128j23tx133
129k23tx134
130l23tx135
131m23tx136
132n23tx137
133o23tx138
134p23tx139
135q23tx140
136r23tx141
137s23tx142
138b24tx143
139c24tx144
140g24tx145
141h24tx146
142i24tx147
143j24tx148
144k24tx149
145l24tx150
146m24tx151
147n24tx152
148o24tx153
149p24tx154
150q24tx155
151r24tx156
152s24tx157
153b25tx158
154c25tx159
155g25tx160
156h25tx161
157i25tx162
158j25tx163
159k25tx164
160l25tx165
161m25tx166
162n25tx167
163o25tx168
164p25tx169
165q25tx170
166r25tx171
167s25tx172
168b26tx173
169c26tx174
170g26tx175
171h26tx176
172i26tx177
173j26tx178
174k26tx179
175l26tx180
176m26tx181
177n26tx182
178o26tx183
179p26tx184
180q26tx185
181r26tx186
182s26tx187
183b27tx188
184c27tx189
185g27tx190
186h27tx191
187i27tx192
188j27tx193
189k27tx194
190l27tx195
191m27tx196
192n27tx197
193o27tx198
194p27tx199
195q27tx200
196r27tx201
197s27tx202
198b28tx203
199c28tx204
200g28tx205
201h28tx206
202i28tx207
203j28tx208
204k28tx209
205l28tx210
206m28tx211
207n28tx212
208o28tx213
209p28tx214
210q28tx215
211r28tx216
212s28tx217
213b29tx218
214c29tx219
215g29tx220
216h29tx221
217i29tx222
218j29tx223
219k29tx224
220l29tx225
221m29tx226
222n29tx227
223o29tx228
224p29tx229
225q29tx230
226r29tx231
227s29tx232
228b30tx233
229c30tx234
230g30tx235
231h30tx236
232i30tx237
233j30tx238
234k30tx239
235l30tx240
236m30tx241
237n30tx242
238o30tx243
239p30tx244
240q30tx245
241r30tx246
242s30tx247
243b31tx248
244c31tx249
245g31tx250
246h31tx251
247i31tx252
248j31tx253
249k31tx254
250l31tx255
251m31tx256
252n31tx257
253o31tx258
254p31tx259
255q31tx260
256r31tx261
257s31tx262
258b32tx263
259c32tx264
260g32tx265
261h32tx266
262i32tx267
263j32tx268
264k32tx269
265l32tx270
266m32tx271
267n32tx272
268o32tx273
269p32tx274
270q32tx275
271r32tx276
272s32tx277
273g33tx401
274h33tx402
275i33tx403
276j33tx404
277k33tx405
278l33tx406
279m33tx407
280n33tx408
281o33tx409
282p33tx410
283q33tx411
284r33tx412
285s33tx413
286k34tx414
Control Range


Dave
 

Attachments

  • Capture.JPG
    Capture.JPG
    22.1 KB · Views: 6
  • Capture2.JPG
    Capture2.JPG
    19.5 KB · Views: 7
Upvote 0
The error means a control listed in column B does not exist

I just copied across what you posted - you need to check the list for naming errors

Dave
 
Upvote 0

Forum statistics

Threads
1,215,473
Messages
6,125,013
Members
449,204
Latest member
tungnmqn90

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top