If a specific value will entered in row "A", a specific price should be inserted into row "D" and after that the entered price should be displayed in a messagebox.
The first part was just an easy setup, but with the msgbox I have actually some issues. Maybe because of the procedure of the code?! The price is just in this moment inside the cell and my code is already trying to get this in the moment empty cell?! - not sure.
Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo Handler Dim price As String If Target.Column = 1 And Target.Value = "XY01" Then Application.EnableEvents = False Target.Offset(0, 3) = Format(0.7, "currency") Application.EnableEvents = True price = ActiveCell.Offset(0, 3).Value MsgBox "The price is now " & price End If Handler: End Sub
My 2nd question is that I have formatted the value as "currency", but I'm anyway get this error message (in English like that the cell is formatted as text). Also by formatting the cell by the excel tools the error message will not disappear.
Any Idea to fix this?