Hello,
I have a a Form in a chart that allows you to add values. Currently it automatically adds a blank row after the new values are entered in the chart. Here is the code:
addslab macro
'
'
Dim i, k As Long
i = 1
k = AddHorizontalItemForm.TextBox1
For i = 1 To k
ActiveCell.Rows("1:1").EntireRow.Copy
ActiveCell.Rows("1:1").EntireRow.Insert Shift:=xlDown
Application.CutCopyMode = False
ActiveCell.Offset(0, -88).Range("A1").FormulaR1C1 = "=RC[89]"
ActiveCell.Offset(0, -86).Range("A1").FormulaR1C1 = "=RC[89]"
ActiveCell.Offset(0, -61).Range("A1").FormulaR1C1 = "=feet(RC[62])*12"
ActiveCell.Offset(0, 1).Range("A1").FormulaR1C1 = "SLAB"
ActiveCell.Offset(1, 0).Range("A1").Select
Next i
ActiveCell.Rows("1:1").EntireRow.Copy
ActiveCell.Rows("1:1").EntireRow.Insert Shift:=xlDown
Application.CutCopyMode = False
ActiveCell.Offset(1, 0).Range("A1").Select
Application.CutCopyMode = False
End Sub
I've just added check boxes on the form next to each category, "addslab" being one, and I want to make it so if the check box is checked, it will not add a row. If it is unchecked, it will add a row. Do I write this code under each check box's sub or can I add it in with each category's macro somehow? Thanks!
I have a a Form in a chart that allows you to add values. Currently it automatically adds a blank row after the new values are entered in the chart. Here is the code:
addslab macro
'
'
Dim i, k As Long
i = 1
k = AddHorizontalItemForm.TextBox1
For i = 1 To k
ActiveCell.Rows("1:1").EntireRow.Copy
ActiveCell.Rows("1:1").EntireRow.Insert Shift:=xlDown
Application.CutCopyMode = False
ActiveCell.Offset(0, -88).Range("A1").FormulaR1C1 = "=RC[89]"
ActiveCell.Offset(0, -86).Range("A1").FormulaR1C1 = "=RC[89]"
ActiveCell.Offset(0, -61).Range("A1").FormulaR1C1 = "=feet(RC[62])*12"
ActiveCell.Offset(0, 1).Range("A1").FormulaR1C1 = "SLAB"
ActiveCell.Offset(1, 0).Range("A1").Select
Next i
ActiveCell.Rows("1:1").EntireRow.Copy
ActiveCell.Rows("1:1").EntireRow.Insert Shift:=xlDown
Application.CutCopyMode = False
ActiveCell.Offset(1, 0).Range("A1").Select
Application.CutCopyMode = False
End Sub
I've just added check boxes on the form next to each category, "addslab" being one, and I want to make it so if the check box is checked, it will not add a row. If it is unchecked, it will add a row. Do I write this code under each check box's sub or can I add it in with each category's macro somehow? Thanks!