hey guys,
i was just trying to play with vba, to see if i can code something at least. might take it as a basic vba lesson![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
i wanted to add some OK CANCEL confirmation before delete action. but something went wrong![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
could u explain me my mistake please
i was just trying to play with vba, to see if i can code something at least. might take it as a basic vba lesson
![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
i wanted to add some OK CANCEL confirmation before delete action. but something went wrong
![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
Code:
Dim DelPic As String
DelPic = Me.picafter1filepath
If IsNull(Me.picafter1filepath) Or Me.picafter1filepath = "" Then
MsgBox "No Picture to Delete", vbInformation, "There is not much to delete"
Else 'Execute
MsgBox "Are u sure ?", vbOKCancel, "You are about to delete this picture"
If Response = vbYes Then
MyString = "Yes"
Kill DelPic
Me.picafter1filepath = ""
Me.picafter1picname = ""
Me.Refresh
Else
MyString = "No"
End If
End If
End Sub
could u explain me my mistake please