hmltnangel
Active Member
- Joined
- Aug 25, 2010
- Messages
- 290
- Office Version
- 365
- Platform
- Windows
Hi folks,
Hopefully a quick one I had a MsgBox pop up with the following code.
This worked fine.
I need to change it a little so that its an input box with a field for a user to complete. The data they complete will then populate a cell. SO I changed the code to
WHich "works", but then doesnt stop after the user has input data.
Any suggestions for what im missing
Hopefully a quick one I had a MsgBox pop up with the following code.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("D8") > Range("G8") Then
MsgBox "Budget Exceeded by " & Abs(Range("D8") - Range("G8"))
End If
End Sub
This worked fine.
I need to change it a little so that its an input box with a field for a user to complete. The data they complete will then populate a cell. SO I changed the code to
VBA Code:
rivate Sub Worksheet_Change(ByVal Target As Range)
Dim myValue As Variant
If Range("D8") > Range("G8") Then
MsgBox "Budget Exceeded by " & Abs(Range("D8") - Range("G8"))
myValue = InputBox("Explain why budget exceeded")
Range("B10").Value = myValue
End If
End Sub
WHich "works", but then doesnt stop after the user has input data.
Any suggestions for what im missing