Home > Software engineering >  For bosses to help me take a look at the code, debugging nothing wrong but I don't know why I r
For bosses to help me take a look at the code, debugging nothing wrong but I don't know why I r

Time:11-16

Sub CommandButton3_Click ()

Set how=Sheets (" risk rating chart ")
Set the Map=Sheets (" risk Map ")

How. Activate
Application. ScreenUpdating=False
How the Range (" D11: K18 "). Copy
The Map. The Range (" B4 "). PasteSpecial Paste:=xlPasteFormats
The Map. The Range (" L4 "). PasteSpecial Paste:=xlPasteFormats

Map. Activate

Dim PIC As Shape
Min_width=Range (" b4 "). The Width
Max_width=Range (" b4: t11 "). The Width
For Each PIC In Sheets (" risk map ") Shapes
If PIC. Left & gt; Min_width And PIC. Width + PIC. Left & lt; Max_width And PIC. Height & lt; 93 And PIC. Width & lt; Then 93
PIC. Delete
End the If
Next

For k=2 To 150
Aaa=Map. Cells (k, "AH"). The Value
BBB=Map. Cells (k, "AG"). The Value
DDD=Map. Cells (k, "AF"). The Value
If DDD=1 Then
Map. Shapes. Range (Array (" R "1)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
ElseIf DDD=2 Then
Map. Shapes. Range (Array (" R "2)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
ElseIf DDD=3 Then
Map. Shapes. Range (Array (" 3 R ")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
ElseIf DDD=4 Then
Map. Shapes. Range (Array (" 4 R ")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
ElseIf DDD=5 Then
Map. Shapes. Range (Array (" R "5)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
ElseIf DDD=6 Then
Map. Shapes. Range (Array (" R "6)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
ElseIf DDD=7 Then
Map. Shapes. Range (Array (" R "7)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
8 Then ElseIf DDD=
Map. Shapes. Range (Array (" R 8 ")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
9 Then ElseIf DDD=
Map. Shapes. Range (Array (" R "9)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
10 Then ElseIf DDD=
Map. Shapes. Range (Array (" R "10)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
11 Then ElseIf DDD=
Map. Shapes. Range (Array (" R "11)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
12 Then ElseIf DDD=
Map. Shapes. Range (Array (" R ")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
13 Then ElseIf DDD=
Map. Shapes. Range (Array (" R "13)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
14 Then ElseIf DDD=
Map. Shapes. Range (Array (" R "14)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
15 Then ElseIf DDD=
Map. Shapes. Range (Array (" R "15)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
ElseIf DDD=16 Then
Map. Shapes. Range (Array (16 "R")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
17 Then ElseIf DDD=
Map. Shapes. Range (Array (" R "17)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
18 Then ElseIf DDD=
Map. Shapes. Range (Array () "R 18"). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
19 Then ElseIf DDD=
Map. Shapes. Range (Array (19 "R")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
ElseIf DDD=20 Then
Map. Shapes. Range (Array (" R "20)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
21 Then ElseIf DDD=
Map. Shapes. Range (Array (" R "21)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
22 Then ElseIf DDD=
Map. Shapes. Range (Array (22 "R")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
23 Then ElseIf DDD=
Map. Shapes. Range (Array (23 "R")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
24 Then ElseIf DDD=
Map. Shapes. Range (Array (" R ")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
ElseIf DDD=25 Then
Map. Shapes. Range (Array (" R "25)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
26 Then ElseIf DDD=
Map. Shapes. Range (Array (" R "26)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
27 Then ElseIf DDD=
Map. Shapes. Range (Array (27 "R")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
28 Then ElseIf DDD=
Map. Shapes. Range (Array (28 "R")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
29 Then ElseIf DDD=
Map. Shapes. Range (Array (29 "R")). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
ElseIf DDD=30 Then
Map. Shapes. Range (Array (" R "30)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
Map. Paste
31 Then ElseIf DDD=
Map. Shapes. Range (Array (" R "31)). Select
Selection. Copy
Map. Cells (aaa, BBB). Select
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • VBA
  • Related