C
Charles
I have a UserForm which is used to update a document and print two copies.
The user enters the number of docs to complete in a TexBox TxtCnt.
The For.. Next Statement works but control does not return to the UserForm
after printing. How do i do that?
This is a simplified version of the code (I have removed a lot of repetitive
lines):
Private Sub cmdOK_Click()
Dim strReason As String
Dim strType As String
Dim i As Integer
For i = 1 To TxtCnt.Value
If optReason1 = True Then strReason = "Actual Exit"
If optType1 = True Then strType = "Leaving Service"
Application.ScreenUpdating = False
UpdateBookmark "bmkID", txtID.Value
UpdateBookmark "bmkSur", txtSur.Value
Application.ScreenUpdating = True
ActiveDocument.PrintOut Copies:=2
optReason1.Value = True
optType1.Value = True
txtID.Value = Null
txtSur.Value = Null
Application.ScreenUpdating = True
Next i
End Sub
Thanks for any help you can offer.
The user enters the number of docs to complete in a TexBox TxtCnt.
The For.. Next Statement works but control does not return to the UserForm
after printing. How do i do that?
This is a simplified version of the code (I have removed a lot of repetitive
lines):
Private Sub cmdOK_Click()
Dim strReason As String
Dim strType As String
Dim i As Integer
For i = 1 To TxtCnt.Value
If optReason1 = True Then strReason = "Actual Exit"
If optType1 = True Then strType = "Leaving Service"
Application.ScreenUpdating = False
UpdateBookmark "bmkID", txtID.Value
UpdateBookmark "bmkSur", txtSur.Value
Application.ScreenUpdating = True
ActiveDocument.PrintOut Copies:=2
optReason1.Value = True
optType1.Value = True
txtID.Value = Null
txtSur.Value = Null
Application.ScreenUpdating = True
Next i
End Sub
Thanks for any help you can offer.