Results 1 to 6 of 6

MsgBox does not appear after the code executes.

Threaded View

  1. #1
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Smile MsgBox does not appear after the code executes.

    Hi
    I have a code, which works, but I want msgbox appear after the code executes. But it does not. Why?

    Private Sub CommandButton7_Click() 'Code is not working
    Dim intIndex As Integer, intCount As Integer, i As Integer, ListRow As Integer
    Application.ScreenUpdating = False
    On Error GoTo oops
        For intIndex = 0 To ListBox1.ListCount - 1 'Counts how many items in listbox.1 selected
            If ListBox1.Selected(intIndex) Then intCount = intCount + 1
        Next intIndex
    
        For ListRow = 1 To 40 'Hides corresponding buttons
            If ListBox1.Selected(ListRow) Then
                ActiveSheet.Shapes(Application.WorksheetFunction.Index(Range("ButtonName"), _
                    Application.WorksheetFunction.Match(ListBox1.List(ListRow), _
                ActiveSheet.Range("Source"), 0))).Visible = False
            End If
        Next ListRow
        MsgBox "DONE!!!!!!!!!!!!!" 'HERE HERE HERE NOT APPEARING
    oops:
    Unload Me
    End Sub
    Attached Files Attached Files
    Last edited by contaminated; 01-05-2010 at 07:51 AM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

Thread Information

Users Browsing this Thread

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

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