ABrown
07-07-2008, 06:52 AM
Hi - I need to take control of the Insert Break form to ensure that when users insert a section break it does not have different first page selected. I can have loaded the form with PgBreak = True so that the PgBreak Option button is selected and then run the following Case Select statement when they click ok - problem is it isn't working...... Can anyone see where I may be going wrong, or a better way that I may approach. The form I have created replicates the Word built-in command and this is the code:
Private Sub Cancel_Click()
Unload Break
End Sub
Private Sub ok_Click()
PgBreak = True
Select Case PgBreak
Case ColBreak = True
Selection.InsertBreak Type:=wdColumnBreak
Unload Break
Case TxtWrapBreak = True
Selection.InsertBreak Type:=wdTextWrappingBreak
Unload Break
Case NextPage = True
Selection.InsertBreak Type:=wdSectionBreakNextPage
Unload Break
Case Continuous = True
Selection.InsertBreak Type:=wdSectionBreakContinuous
Unload Break
Case EvenPage = True
Selection.InsertBreak Type:=wdSectionBreakEvenPage
Unload Break
Case OddPage = True
Selection.InsertBreak Type:=wdSectionBreakOddPage
Unload Break
Case Else
Selection.InsertBreak Type:=wdPageBreak
Unload Break
End Select
End Sub
Many thanks if you can help.
Regards.
Annette:dunno
Private Sub Cancel_Click()
Unload Break
End Sub
Private Sub ok_Click()
PgBreak = True
Select Case PgBreak
Case ColBreak = True
Selection.InsertBreak Type:=wdColumnBreak
Unload Break
Case TxtWrapBreak = True
Selection.InsertBreak Type:=wdTextWrappingBreak
Unload Break
Case NextPage = True
Selection.InsertBreak Type:=wdSectionBreakNextPage
Unload Break
Case Continuous = True
Selection.InsertBreak Type:=wdSectionBreakContinuous
Unload Break
Case EvenPage = True
Selection.InsertBreak Type:=wdSectionBreakEvenPage
Unload Break
Case OddPage = True
Selection.InsertBreak Type:=wdSectionBreakOddPage
Unload Break
Case Else
Selection.InsertBreak Type:=wdPageBreak
Unload Break
End Select
End Sub
Many thanks if you can help.
Regards.
Annette:dunno