Dark0Prince
Active Member
- Joined
- Feb 17, 2016
- Messages
- 433
Here is the code I'm using to double space but for some reason it doens't work when my data is in a table.
Let me add that this data is coming from a microsoft query.
Let me add that this data is coming from a microsoft query.
Code:
Sub InsertBlankRows()
Dim Rng As Range
Dim WorkRng As Range
Dim FirstRow As Integer, xRows As Integer, xCols As Integer
On Error Resume Next
xTitleId = "Select The Range"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
FirstRow = WorkRng.Row
xRows = WorkRng.Rows.Count
xCols = WorkRng.Columns.Count
Application.ScreenUpdating = False
WorkRng.Cells(xRows, 1).Resize(1, xCols).Select
Do Until Selection.Row = FirstRow
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Offset(-1, 0).Select
Loop
Application.ScreenUpdating = True
End Sub
Last edited: