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
Bookmarks