Defining a Label

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to send code from a CommandButton2 to Workbook Open. Example:
If Commandbutton2 is "clicked", (which is on a UserForm) then GoTo Workbook
Open() Inputagain: Exit Sub
 
Just copy the inputagain:macro and paste in the command button code,
don't send it back to workbook open:confused: :
 
I need to some how send a message to my other code which is in the Workbook
open() and tell it to Exit Sub before the other code is executed. Example: If
Commandbuttonw2 is clicked then go to Inputagain which will Exit Sub before
the rest of the code is executed. Don't want anything executed after
"Inputagain" if Commandbutton2 is clicked.
L = Month(Date) * 10000 + Year(Date)
M = GetSetting("Demo", "Drafts", "Month", 0)
If L = M Then Exit Sub
If Month(Date) = 4 Then
If Day(Date) >= 24 And Day(Date) < 27 Then
UserForm1.Show
Inputagain: Exit Sub 'Here is the problem!
If MsgBox("Do you qualify for Bank Day?", _
vbYesNo) = vbYes Then
MsgBox ("1 Day has been added to your Bank Days")
Call SaveSetting("Demo", "Drafts", "Month", L)
Worksheets("Vacation").Range("C3").Value = 1
Else
Worksheets("Vacation").Range("C3").Value = 0
End If
End If
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top