Hello. Its my first post here !
I need some help in VBA. Just started recently using it and finding it to be of great help. Im stuck on one problem though.
I need to insert rows in a sheet a certain number of times. To insert rows i used this command:
Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
Which works alright. Problem is it runs only once. I need to run it multiple times.. So i did this:
For i = 1 To 19
Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
Next i
And again it works alright.. But the problem is, I dont know exactly how many times im going to repeat this command. It is calculated in cell I10. I have a formula set in sheet1, Cell I10 which tells me that i need 19 rows. So i was hoping i could link this cell up so that it would repeat this command as many times as the value in Sheet1,Cell I10 is. Cant get to do this though.
Help me out !
Regards!
I need some help in VBA. Just started recently using it and finding it to be of great help. Im stuck on one problem though.
I need to insert rows in a sheet a certain number of times. To insert rows i used this command:
Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
Which works alright. Problem is it runs only once. I need to run it multiple times.. So i did this:
For i = 1 To 19
Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
Next i
And again it works alright.. But the problem is, I dont know exactly how many times im going to repeat this command. It is calculated in cell I10. I have a formula set in sheet1, Cell I10 which tells me that i need 19 rows. So i was hoping i could link this cell up so that it would repeat this command as many times as the value in Sheet1,Cell I10 is. Cant get to do this though.
Help me out !
Regards!