View Single Post
 
Old 05-09-2010, 01:08 AM
chesspupil chesspupil is offline Windows XP Office 2003
Novice
 
Join Date: Apr 2006
Posts: 8
chesspupil
Default

Got an error I hope you can help....

Im getting Case without select errors and case without select...
Would these be better off as separate macros as the first one is functional if I delete the items I added in the check box value areas.

I included an updated attachment and you can see the marco below...
Form ending in B has the bad macro, none-B form has only the first macro with not checkbox name changes

And if this works I would like to also have the selection of the PT or MT box cause the selection of a box in 15 or 16 as applicable. If MT is selected the the last box in 15 and if PT is selected then the first box in 16 is selected.

Also, using the machines local date I would like the second block of block 19 and 20 to use the PC's current date.

Sub NameDDOnExit()
Dim oFF As FormFields
Set oFF = ActiveDocument.FormFields
Select Case oFF("Name").Result
Case "USS Florida SSGN-728"
oFF("UIC").Result = "21038"
Case "USS Georgia SSGN-729"
oFF("UIC").Result = "21039"
Case "USS Alaska SSBN-732"
oFF("UIC").Result = "21042"
Case "USS Tennessee SSBN-734"
oFF("UIC").Result = "21044"
Case "USS West Virginia SSBN-736"
oFF("UIC").Result = "21365"
Case "USS Maryland SSBN-738"
oFF("UIC").Result = "21460"
Case "USS Rhode Island SSBN-740"
oFF("UIC").Result = "21682"
Case "USS Wyoming SSBN-742"
oFF("UIC").Result = "21846"
Case "TRF"
oFF("UIC").Result = "44466"
Case "Triper"
oFF("UIC").Result = "00024"
Case "CSS-20"
oFF("UIC").Result = "63976"
Case " "
oFF("UIC").Result = " "
End Select
Case "VT_DIM"
Select Case oFF("VT_DIM").CheckBox.Value
Case "True"
oFF("B11_1").Result = "1C"
Case Else
oFF("B11_1").Result = ""
Case "PT"
Select Case oFF("PT").CheckBox.Value
Case "True"
oFF("B11_2").Result = "4E"
Case Else
oFF("B11_2").Result = ""
Case "MT"
Select Case oFF("MT").CheckBox.Value
Case "True"
oFF("B11_3").Result = "3G"
Case Else
oFF("B11_3").Result = ""
End Select
End Select
End Sub
Attached Files
File Type: doc Misc report rev 5--10 BLANK-B.doc (60.0 KB, 28 views)
File Type: doc Misc report rev 5--10 BLANK.doc (60.0 KB, 24 views)
Reply With Quote