• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

hide column

kalpeshpatel

New Member
if worksheet 1 in " A1 " cell enter any value than cursor move other cell otherwise massage box shown " enter any value "


give me vba macro for this problem


how it possible
 
See if this code serves the purpose. The code looks if your target cell which compulsory requires value falls within A1-A10. If yes then it will ask for value if not then it will do nothing.

You need to put the code in the required worksheet code window


Sub worksheet_change(ByVal Target As Range)


If Not Application.Intersect(Target, Me.Range("A1:A10")) Is Nothing Then


If IsEmpty(Target) Then


MsgBox "Enter any Value", vbOKOnly

Target.Activate

Else

target.Offset(1, 0).Activate


End If

End If


End Sub
 
Back
Top