AnyOldName
New Member
- Joined
- May 18, 2019
- Messages
- 8
I'm using this line of code to add 12 empty rows at the top of a worksheet
Var_RawData_Worksheet.Rows("1:12").Insert shift:=xlShiftDown
I'd like to use a variable to control the number of rows but can't figure out the syntax, what I need is something like:
VARIABLE_NO = 12
Var_RawData_Worksheet.Rows("1: VARIABLE_NO").Insert shift:=xlShiftDown
Apologies for what is probably a very stupid question, my VBA is coming on but sometimes the basic stuff beats me.
Var_RawData_Worksheet.Rows("1:12").Insert shift:=xlShiftDown
I'd like to use a variable to control the number of rows but can't figure out the syntax, what I need is something like:
VARIABLE_NO = 12
Var_RawData_Worksheet.Rows("1: VARIABLE_NO").Insert shift:=xlShiftDown
Apologies for what is probably a very stupid question, my VBA is coming on but sometimes the basic stuff beats me.