Hi all, following basic example:
I would like to input "Blank" in the field if the user hits OK, but if the user hits cancel I would like the original cell value which can be nothing, to stay the same? I understand the vbnullstring returning the "Blank" is the problem.. but the idea would be that my macro bumps into an empty cell, the inputbox pops up and asks if you want to change this cell, and if the user hits ok without entering anything then, its should change the cell value to "Blank" if the user hits cancel, then don't change the empty cell, just exit the macro.
Possible?
Thank you!
Code:
Sub testing2()
Dim THG As Variant
THG = InputBox("Try")
If THG = vbNullString Then THG = "Blank"
Sheet4.Range("C30") = THG
End Sub
I would like to input "Blank" in the field if the user hits OK, but if the user hits cancel I would like the original cell value which can be nothing, to stay the same? I understand the vbnullstring returning the "Blank" is the problem.. but the idea would be that my macro bumps into an empty cell, the inputbox pops up and asks if you want to change this cell, and if the user hits ok without entering anything then, its should change the cell value to "Blank" if the user hits cancel, then don't change the empty cell, just exit the macro.
Possible?
Thank you!
Last edited: