Dansecon09
New Member
- Joined
- Mar 12, 2022
- Messages
- 1
- Office Version
- 2019
- 2016
- 2013
- Platform
- Windows
Hello fairly new with vba but having some issues... I have a workbook with 3 sheets. Lets say sheet A sheet B and sheet C. Sheet B is a a form with data entered in certain say cell C5 , F11 and G15. In a nut shell I want to make an archive by copying a sheet, rename it, hide it, and clear the original forms data.
Specifically I want to
-Copy sheet B
-Rename the copied sheet via an input box "Please rename the sheet" (if the entered name exists already the input box to pop again stating name already exists "please enter a new name")
-Hide the newly renamed sheet
- return to sheet B, clear the data from cells C5, F11, and G15
-have a msgbox stating the "The sheet has been Archived"
The first time I run it, it functions fine. Just as intended. I named the new copied sheet "blue" When I run it a second time and enter the the name "red" It does not rename the newest copied sheet B but renames sheet Blue as Red. The newest copied sheet B is named sheet B (2) instead of Red.
Specifically I want to
-Copy sheet B
-Rename the copied sheet via an input box "Please rename the sheet" (if the entered name exists already the input box to pop again stating name already exists "please enter a new name")
-Hide the newly renamed sheet
- return to sheet B, clear the data from cells C5, F11, and G15
-have a msgbox stating the "The sheet has been Archived"
The first time I run it, it functions fine. Just as intended. I named the new copied sheet "blue" When I run it a second time and enter the the name "red" It does not rename the newest copied sheet B but renames sheet Blue as Red. The newest copied sheet B is named sheet B (2) instead of Red.