So basically i am running this macro to generate the coordinates of certain points on a piece of material. However once the outer edge of the material (the breadth=1000) has been plotted i need the macro to stop running (leave cells unchanged). Also i was wondering if there was any way to automatically generate a general code or if my code could be refined and made better.
B is breadth
L is length
W is strip width
S is starting point which will be (0,0)
All help is greatly appreciated
Sub Numbers()
Dim B_1 As Integer
Dim L_2 As Integer
Dim W_3 As String
Dim S_1 As String
N_B = 1000
N_L = 500
N_W = 250
S_1 = 0
Worksheets(2).Range("A2").Value = "X Coordinate"
Worksheets(2).Range("A3").Value = S_1
Worksheets(2).Range("A4").Value = S_1
Worksheets(2).Range("A5").Value = N_W
Worksheets(2).Range("A6").Value = N_W
Worksheets(2).Range("A7").Value = (2 * N_W)
Worksheets(2).Range("A8").Value = (2 * N_W)
Worksheets(2).Range("A9").Value = (3 * N_W)
Worksheets(2).Range("B2").Value = "Y Coordinate"
Worksheets(2).Range("B3").Value = S_1
Worksheets(2).Range("B4").Value = N_L
Worksheets(2).Range("B5").Value = S_1
Worksheets(2).Range("B6").Value = N_L
Worksheets(2).Range("B7").Value = S_1
Worksheets(2).Range("B8").Value = N_L
Worksheets(2).Range("B9").Value = S_1
If "A:" > (Range("K3").Value) Then
End
End If
End Sub
B is breadth
L is length
W is strip width
S is starting point which will be (0,0)
All help is greatly appreciated
Sub Numbers()
Dim B_1 As Integer
Dim L_2 As Integer
Dim W_3 As String
Dim S_1 As String
N_B = 1000
N_L = 500
N_W = 250
S_1 = 0
Worksheets(2).Range("A2").Value = "X Coordinate"
Worksheets(2).Range("A3").Value = S_1
Worksheets(2).Range("A4").Value = S_1
Worksheets(2).Range("A5").Value = N_W
Worksheets(2).Range("A6").Value = N_W
Worksheets(2).Range("A7").Value = (2 * N_W)
Worksheets(2).Range("A8").Value = (2 * N_W)
Worksheets(2).Range("A9").Value = (3 * N_W)
Worksheets(2).Range("B2").Value = "Y Coordinate"
Worksheets(2).Range("B3").Value = S_1
Worksheets(2).Range("B4").Value = N_L
Worksheets(2).Range("B5").Value = S_1
Worksheets(2).Range("B6").Value = N_L
Worksheets(2).Range("B7").Value = S_1
Worksheets(2).Range("B8").Value = N_L
Worksheets(2).Range("B9").Value = S_1
If "A:" > (Range("K3").Value) Then
End
End If
End Sub