ok thanks its working now
ok thanks its working now
Be careful of the use of End. It will reset all module/project level variables.
The problem is that the response variable is local to the caller routine.
You either need to use a public variable or a private variable within the userform that you can read.
public variable approach.
![]()
Public response As Integer Private Sub CommandButton1_Click() Dim click As Integer click = ActiveSheet.Range("Z1") click = click + 1 ActiveSheet.Range("Z1") = click UserForm1.Show If response = 1 Then Exit Sub End If Call NotifyDepartments(click) End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks