dannyok90
Board Regular
- Joined
- Aug 30, 2016
- Messages
- 115
Hi Guys,
I'm aware there is tons of information on the net about this and I'm sort of biting the bullet asking such a generic question.
I have a spreadsheet which is a template at the beginning of its life so there is literally no data in there what so ever.
I'm wondering if someone could help me with the code for a new row button that sits at the bottom of the table?
at the moment I have two lines (1&2) ready for data to be populated, the second of the two is a copy down row so users can drag a new row down without copying the information from the last entry.
the way the entries are numbered is by using the =ROW()-1 function so I'm thinking if I could get the button to sit underneath line one and use line two as the copying line I could hide that row and just have the code insert the new row underneath line one and the sequential numbers would correct themselves.
the button would move as the table expanded ideally..
I'm starting to understand code, but its very early days for me so your input is massively appreciated - there maybe a much better way of achieving what I'm trying to achieve but this is the best idea I could come up with in terms of the mechanics of the VBA.
Another point to note is that this spreadsheet is protected to avoid users changing formula cells, there is two cells along the row that are locked and that's the need for this button, because they cant highlight the entire row and copy it down when protection is on.
Thanks Guys :D
I'm aware there is tons of information on the net about this and I'm sort of biting the bullet asking such a generic question.
I have a spreadsheet which is a template at the beginning of its life so there is literally no data in there what so ever.
I'm wondering if someone could help me with the code for a new row button that sits at the bottom of the table?
at the moment I have two lines (1&2) ready for data to be populated, the second of the two is a copy down row so users can drag a new row down without copying the information from the last entry.
the way the entries are numbered is by using the =ROW()-1 function so I'm thinking if I could get the button to sit underneath line one and use line two as the copying line I could hide that row and just have the code insert the new row underneath line one and the sequential numbers would correct themselves.
the button would move as the table expanded ideally..
I'm starting to understand code, but its very early days for me so your input is massively appreciated - there maybe a much better way of achieving what I'm trying to achieve but this is the best idea I could come up with in terms of the mechanics of the VBA.
Another point to note is that this spreadsheet is protected to avoid users changing formula cells, there is two cells along the row that are locked and that's the need for this button, because they cant highlight the entire row and copy it down when protection is on.
Thanks Guys :D