Results 1 to 6 of 6

i want to add a YES or No MsgBox to my Code

Threaded View

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,095

    Post i want to add a YES or No MsgBox to my Code

    Plz help
    i have this code for Update Data Validation List Automatically......................i want to add a Yes Or No msgbox.......
    code:
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim NewEntry As String
    If Target.Cells.Count > 1 Then Exit Sub
    If Target = "" Then Exit Sub
    
    If Not Intersect(Target, Range("C61:C500")) Is Nothing Then
        NewEntry = ""
        NewEntry = Target
       If WorksheetFunction.CountIf(Sheet4.Range("NAME_SID"), NewEntry) = 0 Then
         Sheet4.Range("NAME_SID").End(xlDown).Offset(1, 0) = NewEntry
         Sheet4.Range("NAME_SID").Resize(Sheet4.Range("NAME_SID").Rows.Count + 0, 1).Name = "NAME_SID"
       End If
    End If
    
    End Sub
    Last edited by HaroonSid; 03-04-2014 at 01:37 AM. Reason: SOLVED

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Workbook_Open code not firing unless MsgBox is in code
    By yay_excel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-09-2013, 03:11 PM
  2. VBA Code for msgbox
    By j.farr3ll in forum Excel General
    Replies: 4
    Last Post: 09-01-2011, 09:01 AM
  3. Add MsgBox to code
    By Phixtit in forum Excel General
    Replies: 2
    Last Post: 01-10-2010, 07:44 PM
  4. VBA code using if then and msgbox
    By snoopy in forum Excel General
    Replies: 0
    Last Post: 12-01-2005, 04:48 PM
  5. [SOLVED] MsgBox Code Error
    By MBlake in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-02-2005, 07:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1