dukeofscouts
Board Regular
- Joined
- Jan 19, 2009
- Messages
- 146
Sounds simple enough, but here is the issue:
I'm using a Macro to create a "Are you sure" button. Click the second button a macro runs that saves the results into a database, and clears the date that the results are based off of. I'd like to then delete the "Are you sure" button, so that I can't accidenetly clear the data before I'm ready to. The VBA code defines the button by the name (Ie: Button 4). However, since the button is made fresh each time, the name is not the same every time causing an error message to appear when I run the macro. The button is in the same place on the worksheet everytime the creation macro runs. Is there a way around this error that will allow me to delete the button?
Time line:
-Enter Data
-Click "Save and Clear" Button
--Display "Are you Sure" Button
-Click "Are you Sure" Button
--Save results of data entry, clear Data, and delete "are you sure" Button
(Repeat)
I'm using a Macro to create a "Are you sure" button. Click the second button a macro runs that saves the results into a database, and clears the date that the results are based off of. I'd like to then delete the "Are you sure" button, so that I can't accidenetly clear the data before I'm ready to. The VBA code defines the button by the name (Ie: Button 4). However, since the button is made fresh each time, the name is not the same every time causing an error message to appear when I run the macro. The button is in the same place on the worksheet everytime the creation macro runs. Is there a way around this error that will allow me to delete the button?
Time line:
-Enter Data
-Click "Save and Clear" Button
--Display "Are you Sure" Button
-Click "Are you Sure" Button
--Save results of data entry, clear Data, and delete "are you sure" Button
(Repeat)