PDA

View Full Version : Bring cursor to next line



duffdiggler
03-16-2006, 09:59 AM
I want to add to new line after the user clicks the Add Procedure button. When the they click on the button. The word Procedure gets printed on the screen, along with the number 1 underneath it.

I want the cursor to appear under the 1. Also to enable the user to type something if they wish. so have the cursor blinking if that's possible.

Here is the code that prints what I was talking about.


Sub printProcedure()
Dim i As Integer
i = 0
Selection.Style = "NumberList"
Selection.TypeText Text:=frmProcedure.txtProcedure.Text

If frmProcedure.txtLines.Text <> "" And frmProcedure.txtLines.Text <> "0" Then

Selection.TypeParagraph

Do While i < frmProcedure.txtLines.Text

Call add_line
i = i + 1
Loop
End If
' For i = 1 To frmProcedure.txtLines.Text
'
' Next i

If frmProcedure.cbTaskComplete.Value = True Then
Selection.TypeParagraph
Call Task_Completed

End If

End Sub

fumei
03-16-2006, 12:56 PM
How can I possible help when you do not give us what add_line does.Call add_lineHmmmm, that's nice. Further: Do While i < frmProcedure.txtLines.Text

Call add_line
i = i + 1
Loop is interesting. i is an integer. You DO have a check to see if frmProcedure.txtLines.Text is NOT "", but let's see, what if it is not "", but it is "howdy neighbour".....Do While i < "howdy neighbour"I think it may be a good idea to use a IsNumeric for some error trapping.

So. add_line. What exactly does it do? Moving a cursor is fairly easy, but it would helpful to know if there is a pargraph to move down to.