Newbie - Help - VBA script
Hi,
I am a newbie and was hoping for some help. I have an existing word 2010 document, what I would like to do is get people to either accept or reject (i.e. Click Yes or No) to my Terms & Conditions before opening that Word document.
I have used the below code as a test and it works great. But now instead of a pop up box. I need something slightly bigger where I can show the entire Terms & Conditions statement.
What I have in mind is, a pop-up form/box that shows the entire T&C statement but with a scroll bar so that users are not overwhelmed with a load of text. Then, simply click Yes or No.
Thanks in advance.
Aj
The code is used and adapted is below:
Private Sub Document_Open()
Dim wdApp As Word.Application
Set wdApp = GetObject(, "Word.Application")
Dim TermsConditions As String
TermsConditions = MsgBox("Greetings", vbYesNo, "Greetings")
If (TermsConditions = vbYes) Then
Exit Sub
ElseIf (TermsConditions = vbNo) Then
wdApp.ActiveDocument.Close
End If
End Sub
|