Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following
Sub NewName() ActiveWorkbook.Unprotect Sheets("Current Round").Unprotect Password:="*******" Application.ScreenUpdating = False Application.EnableEvents = False Dim inputText As String Dim newFileName As String inputText = Application.InputBox("Enter name here", _ "Person's Name", , , , , 2) *******More Code******** End Sub What I would like is that if the inputbox cancel button is clicked then ActiveWorkbook.Protect Sheets("Current Round").Protect Password:="*******" Application.ScreenUpdating = True Application.EnableEvents = True Exit Sub otherwise run the ********More Code******* How do I incorporate that into the Sub? Thanks Sandy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA 2007 -- How can I tell if the user cancelled a Save? | Excel Programming | |||
Hyperlink operation cancelled.... | Excel Discussion (Misc queries) | |||
End Sub if InputBox cancelled (False) | Excel Programming | |||
Avoid unloading of .xla addins when closing books are cancelled. | Excel Programming | |||
Email Sent or Cancelled | Excel Programming |