There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
black screen blue screen blue screen of death boot computer connection crash css dell display driver drivers error excel firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem ram router slow software sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Calendar OCX referencing dates


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Staceman's Avatar
Junior Member with 3 posts.
 
Join Date: Aug 2004
Experience: Advanced
03-Nov-2004, 11:42 AM #1
Calendar OCX referencing dates
I am programming a contract to be completed using a fill in form in Word 2k3. I have inserted 3 calendars using the Calendar Control OCX and now I need to know how to reference them. What is the script needed within the onclick sub? I also need to reference one of them in the form ____day of 2004, is this possible?

This is the script I have so far...it's the code for the button Next>> to post the data to the form..


Private Sub BuInfoOK_Click()

vContractNum = ContractInfo.ContractNum.Text
vSubName = ContractInfo.SubName.Text
vSubAdd1 = ContractInfo.SubAdd1.Text
vSubAdd2 = ContractInfo.SubAdd2.Text
vSubCSZ = ContractInfo.SubCSZ.Text
vSubPhone = ContractInfo.SubPhone.Text
vSubFax = ContractInfo.SubFax.Text
vContractDate = ContractInfo.ContractDate.Value
vSubContractDate = ContractInfo.SubContractDate.Value
vCompletionDate = ContractInfo.CompletionDate.Value

pToggleProtectDoc
ActiveDocument.Bookmarks("bkContractNum").Range.Text = vContractNum
ActiveDocument.Bookmarks("bkSubName").Range.Text = vSubName
ActiveDocument.Bookmarks("bkSubAdd1").Range.Text = vSubAdd1
ActiveDocument.Bookmarks("bkSubAdd2").Range.Text = vSubAdd2
ActiveDocument.Bookmarks("bkSubCSZ").Range.Text = vSubCSZ
ActiveDocument.Bookmarks("bkSubPhone").Range.Text = vSubPhone
ActiveDocument.Bookmarks("bkSubFax").Range.Text = vSubFax
ActiveDocument.Bookmarks("bkSubContractDate").Range.Text = vSubContractDate
pToggleProtectDoc

ContractInfo.Hide

Categories.Show

End Sub


Sub pToggleProtectDoc()

Set Doc = ActiveDocument
If Doc.ProtectionType = wdNoProtection Then
Doc.Protect Password:="xxxx", NoReset:=True, Type:=wdAllowOnlyFormFields
Else
Doc.Unprotect Password:="xxxx"
End If


End Sub

Private Sub ContractDate_Click()
?????????
End Sub


What is the called reference at ?????????
How do I refence and call out the date in the first sub?

Last edited by Staceman : 03-Nov-2004 12:19 PM.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:06 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.