Hey Everyone,
I posted this code up a while ago and it fixed, I am now about to run it live to my estate and it will not populate my user form and runs straight to the declined msg, when id's are in neither pages can anyone help with this.
Sub Workbook_Open()
' Now call the Function to print the User Name On Open the workbook
Call UserName
' Checking details for Term's & Conditions
Dim aid As Range
Dim ac As Range
Dim ids As Range
Dim dids As Range
Dim dac As Range
Dim daid As Range
Set aid = Sheets("Home").Range("J47")
Set daid = Sheets("Home").Range("Q47")
Set ids = Sheets("Accepted Terms and Conditions").Range("A:A")
Set dids = Sheets("Declined Terms and Conditions").Range("A:A")
Set ac = ids.Find(aid)
Set dac = dids.Find(daid)
If ac Is Nothing And dac Is Nothing Then
TCsForm.Show
ElseIf Not ac Is Nothing Then
Sheets("Home").Select
ElseIf Not dac Is Nothing Then
msg = MsgBox("You have previously declined the terms and conditions of the incentive scheme." + vbCrLf + vbCrLf + "Please email tcssincentivescheme@bskyb.com, if you have now accepted the Terms and Conditions.", vbOKOnly, "Warning")
ActiveWorkbook.Close savechanges = True
End If
Application.Calculation = xlCalculationAutomatic
' Now select the sheet and cell reference that you want the user to view/access
Sheets("Cover").Select
Range("A1").Select
' Multiple lines in the MsgBox
End Sub
Bookmarks