Greg,
It doesn't really matter why you did it that way, or even which way you did
it, as I tried to answer both possibilities. The reason that I asked is that
if you did add a reference to the Outlook library (via Tools>References, and
I think you did as you user the Outlook constants olAppointItem and
olMeeting in the Meeting routine) then we can continue to use other
constants.
I am a stroing advocate of typing variables, but in this case, as you seem
unsure of what you are doing, and how to get it to work, I suggest that you
declare those variab les as such
Public strto1
Public strto2
Public strto3 As String
Public strto4 As String
and change the two checkbox routines to this
Private Sub checkbox1_Click()
With Me.CheckBox1
If Me.CheckBox1.Value = True Then
CheckBox1.Caption = "Required"
strto1 = olRequired
Else
Me.CheckBox1 = False
CheckBox1.Caption = "Optional"
strto1 = olOptional
End If
End With
End Sub
Private Sub checkbox2_Click()
With Me.CheckBox2
If Me.CheckBox2.Value = True Then
CheckBox2.Caption = "Required"
strto2 = olRequired
Else
Me.CheckBox2 = False
CheckBox2.Caption = "Optional"
strto2 = olOptional
End If
End With
End Sub
Give it a try, it should work.
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
Greg said:
Bob,
I can't really answer your question. I did it that way because it
worked. In reference to the create object. When I declared the strto I did
it this way
Public strto1 As String
Public strto2 As String
Public strto3 As String
Public strto4 As String
Should I declare them diffreently? I also think that I may be writing
something that is slightly out of my league but I will keep trying. I
really don't think that I have answered your question correctly.