Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88054

How to create a macro that asks if you want to rename a sheet?

$
0
0

I need a msgbox with an If statement that, if yes, sheet("Comparison") will be renamed; and if no, nothing happens. The new name will be the value as the user will put into message box. I don't know exactly how to do it, but I've got this at the moment:

 MsgBox Prompt:="Keep comparison?", _
     Buttons:=vbYesNo

 If vbYes Then
    '
    Else

 End If

This may not be the best way to do it, so feel free to change it, if necessary.


Viewing all articles
Browse latest Browse all 88054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>