Excelnoub
Member
Good day,
How would I change the EntireRow.Insert to only insert a new row from Column A to Column D.
Explanation:
I have to have restriction to a range (Column A to column D) as I will have more code in my Column F and up.
I have code running exactly what I need but I need to change the way my insert functions.
I have a sheet acting as some sort of table of content that can have 3 sets of layers.
I have the title, sub title, positions and sub positions. The way my sheet is set up is that the information from a userform is generated with double clicking in a cell (A3 to D1000). Within this double click, a userform pop’s up. On column select, meaning the user will have in view different information based on which column he has chosen. Column A will have the title and so on and so on. In each selection it will add the information on the next available row from A3. But, if the user selects a cell beside the main title, it will insert a new row:
I cannot use the EntireRow.Insert as in column F has effect and cannot interfere with the code from column A to D.
How can I change to only add a new row from A to D... Making it something like:
ActiveCell.Offset(1).Range(A:D).Insert
How would I change the EntireRow.Insert to only insert a new row from Column A to Column D.
Explanation:
I have to have restriction to a range (Column A to column D) as I will have more code in my Column F and up.
I have code running exactly what I need but I need to change the way my insert functions.
I have a sheet acting as some sort of table of content that can have 3 sets of layers.
I have the title, sub title, positions and sub positions. The way my sheet is set up is that the information from a userform is generated with double clicking in a cell (A3 to D1000). Within this double click, a userform pop’s up. On column select, meaning the user will have in view different information based on which column he has chosen. Column A will have the title and so on and so on. In each selection it will add the information on the next available row from A3. But, if the user selects a cell beside the main title, it will insert a new row:
Code:
Private Sub ComboBox2_Click()
ActiveCell.Offset(1).EntireRow.Insert
ActiveCell.Offset(1).Value = Me.ComboBox2
Unload Me
End Sub
I cannot use the EntireRow.Insert as in column F has effect and cannot interfere with the code from column A to D.
How can I change to only add a new row from A to D... Making it something like:
ActiveCell.Offset(1).Range(A:D).Insert