Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Input Box Code Please Help!!
Hello,
Okay I have an inout box that ask how many rows do you want to insert...I am trying to combine these two codes to bring me back the correct results...can someone please point help me...have been workingon this for the past two hours with no luck...below are the two codes This is the input box code: Private Sub cbutInsert_Click() ORIGSHT = ActiveSheet.Name ORIGROW = ActiveCell.Row ORIGADR = ActiveCell.Address ORIGCOL = Replace(Replace(ORIGADDR, "$", "", 1), CMNDROW, "", 1) If TextBox1.Value < "" Then ActiveCell.Resize(TextBox1.Value, 1).EntireRow.Insert Else ActiveCell.Resize(1, 1).EntireRow.Insert End If Unload Me End Sub This is the results code: Sub insertrowswithformulas() With ActiveCell ..EntireRow.Insert Range(Cells(.Row - 2, "I"), Cells(.Row - 2, "AP")).Copy_ Cells(.Row - 1, "I")) Range(Cells(.Row - 2, "B"), Cells(.Row - 2, "G")).Copy_ Cells(.Row - 1, "B")) End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to modify the code for different type of input? | Excel Worksheet Functions | |||
How to modify the code for different type of input? | Excel Discussion (Misc queries) | |||
Code for Input Box | Excel Programming | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming | |||
1.)Input Boxes 2.) Condensing a Code | Excel Programming |