Hi,
I have an inputbox that sets a public variable and uses if...else to change that value if one has already been set. What I'd like to do is when the user runs the sub when a value has already been set and clicks cancel rather than entering a new value, the value stays as it is rather than gets switch to 0 (or false, or whatever canceling an inputbox does). Here's the sub as it is now:
Thanks!!!
I have an inputbox that sets a public variable and uses if...else to change that value if one has already been set. What I'd like to do is when the user runs the sub when a value has already been set and clicks cancel rather than entering a new value, the value stays as it is rather than gets switch to 0 (or false, or whatever canceling an inputbox does). Here's the sub as it is now:
Code:
Public HldWrkBk As String
Sub HoldWrkBk()
If HldWrkBk = "" Then
HldWrkBk = InputBox("Enter Holding Workbook")
Else
HldWrkBk = InputBox(HldWrkBk, "Enter New Holding Workbook")
End If
End Sub
Thanks!!!