Afternoon everyone, I hope you're well.
Got a slight problem I'm trying to get my head around and was wondering if someone could help.
I've got a bit of code that goes to a named range, inserts a row and copies the format and formula from the row above:
A fairly simple bit of code, which used to work, but due to wanting to have the data in column 'B' part of a Power Query so I can do a data validation without the blanks on another sheet, I've had to turn column B into a table.
Now when running the code, I get the following error message:
<a href="https://imgbb.com/"><img src="https://i.ibb.co/Sxf0DfL/02.png" alt="02" border="0"></a>
I was wondering if someone could help me amend the code so I can still insert a row and copy down from the row above, as when I do it manually, it works fine without an issue.
If it helps, my form looks as follows:
Any and all help is greatly appreciated.
Thank you.
Regards
Marhier
Got a slight problem I'm trying to get my head around and was wondering if someone could help.
I've got a bit of code that goes to a named range, inserts a row and copies the format and formula from the row above:
Code:
Sub AddRowS1()
Application.ScreenUpdating = False
Call PaF_UnProtect
Application.Goto ("Section1")
Rows(Selection.Row - 1).Copy
Rows(Selection.Row).Insert Shift:=xlDown
Call PaF_Protect
Application.ScreenUpdating = True
End Sub
A fairly simple bit of code, which used to work, but due to wanting to have the data in column 'B' part of a Power Query so I can do a data validation without the blanks on another sheet, I've had to turn column B into a table.
Now when running the code, I get the following error message:
<a href="https://imgbb.com/"><img src="https://i.ibb.co/Sxf0DfL/02.png" alt="02" border="0"></a>
I was wondering if someone could help me amend the code so I can still insert a row and copy down from the row above, as when I do it manually, it works fine without an issue.
If it helps, my form looks as follows:
Any and all help is greatly appreciated.
Thank you.
Regards
Marhier
Last edited: