ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding/deleting ranges and renaming accordingly (https://www.excelbanter.com/excel-programming/387148-adding-deleting-ranges-renaming-accordingly.html)

Michael Siegel[_2_]

Adding/deleting ranges and renaming accordingly
 
Hi.

I have a range (A1:J10) named "Person_01". Cell J1 contains a hyperlink
called "Add_Person" with a label that says "Add a new person".

When the user clicks the hyperlink, "Person_01" should be copied and
inserted as "Person_02" right below "Person_01". The hyperlink at the
bottom of "Person_01" should change to "Delete this person" and the
hyperlink at the bottom of "Person_02" should still say "Add a new
person".

As new ranges are added, only the most current range will contain the
"Add a new person" hyperlink, with all former ranges containing the
"Delete this person" hyperlink.

I've already written code to add/delete ranges, but I'm having a hard
time tracking the range names as a "stack" so that I can name
new/existing ranges properly upon addition/deletion of a person.

Can somebody help me conceptualize this issue? I'm very new to VBA.

Thanks.
Michael

*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 06:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com