rjbinney
Active Member
- Joined
- Dec 20, 2010
- Messages
- 279
- Office Version
- 365
- Platform
- Windows
I need to write a macro that inserts a row, and some formulas, BELOW a specific row.
Since the "Insert Row" command adds a row ABOVE the selected row, I would like to:
1) Have a button that says "Insert Row"
2) Have a message box pop up that says something to the effect of, "Make sure you have selected a cell in the correct row", with the options something like, "OK - Go ahead" or "Whoops - Cancel"
3) Then, when they click "OK - Go ahead", it runs the macro.
I've Googled message boxes, and I see the VBA code.
What I don't know is, what actually triggers the display of the message box?
Since the "Insert Row" command adds a row ABOVE the selected row, I would like to:
1) Have a button that says "Insert Row"
2) Have a message box pop up that says something to the effect of, "Make sure you have selected a cell in the correct row", with the options something like, "OK - Go ahead" or "Whoops - Cancel"
3) Then, when they click "OK - Go ahead", it runs the macro.
I've Googled message boxes, and I see the VBA code.
What I don't know is, what actually triggers the display of the message box?