Results 1 to 5 of 5

Skip MsgBox if found error

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    702

    Skip MsgBox if found error

    Hi,

    Using Global Variable declaration and 2 sub functions, I am able to skip MsgBox if the call Macro name has triggered error message. However when call macro name has been transferred to UserForm platform, it will be no longer applicable due to variable (FindWhom) in UserForm has not recognized in the Module (Main Sub). The main purpose of using UserForm is to create progress indicator

    Is there any alternative method? Here is a simple description of my problem..
    Option Explicit
    Dim FindWhom As Integer
    
    Sub openFile()
    
      Call PopulateData
      If FindWhom <> 1 Then MsgBox "Data sucessfully updated"
    End Sub
    
    
    
    
    Sub PopulateData()
    Dim i As Integer, j As Integer
    
    If i <> j Then GoTo GetNext
    
        MsgBox "Found error due to data have not been added"
        FindWhom = 1
        Exit Sub
    
    GetNext:
    End Sub
    Last edited by Faridwahidi; 11-10-2015 at 01:07 PM.
    1. Thank those who have helped you by clicking the Star * below the post.
    2. Please mark your post [SOLVED] if it has been answered satisfactorily.

    Sincerely,
    Farid

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA - If value not found, skip part of macro.
    By crayhons in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2013, 08:31 AM
  2. Skip a 'file not found' dialogue in a loop
    By dicenn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-02-2013, 01:08 PM
  3. How to skip filter action if particular value is not found in record
    By shaikh_javed246 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-31-2012, 02:15 PM
  4. [SOLVED] Msgbox to present values not found
    By pedrofogao21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-26-2012, 03:10 PM
  5. Searching for a value but skip the first found value.
    By george1982 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-14-2009, 09:35 AM
  6. Msgbox until a specific string is found.
    By excelkeechak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-22-2009, 09:43 PM
  7. hlookup to skip past first found 'lookup_value'
    By Ben Morton in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-23-2008, 08:57 AM
  8. skip to next cell if no value is found
    By AirCav in forum Excel General
    Replies: 0
    Last Post: 02-09-2006, 01:50 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