Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Have a button on worksheet that clears certain cells on the sheet, would like
that a message box pops up when pressed asking user for confirmation, have added below to the script on button but it clears cells regardless wether you say O/k or cancel need reposne to O/k "clears cells" or cancel " does not clear cells" Dim response As Long response = MsgBox(prompt:="ok or cancel", Buttons:=vbOKCancel) ' Range("A2:A32,C2:C32,D2:D32,E2:E32,H2:H32").Select Range("H2").Activate Selection.ClearContents Range("A2").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding an error message at close of file when criteria are met | Excel Discussion (Misc queries) | |||
when opening excel I receive a message that says file can't be fo. | Excel Discussion (Misc queries) | |||
changing the message in an error message | Excel Worksheet Functions | |||
"Why did we get here????" popup | Excel Discussion (Misc queries) | |||
Pivot Table not valid error message when formatting data 'button'. | Excel Discussion (Misc queries) |