View Single Post
 
Old 09-19-2016, 05:58 PM
kirkm kirkm is offline Windows XP Office 2003
Advanced Beginner
 
Join Date: Aug 2013
Posts: 40
kirkm is on a distinguished road
Default Help wanted passing data to Form

Code:
Sub ShowPara()
Dim oPara As Paragraph, sText As String, oRng As Range
    For Each oPara In ActiveDocument.Paragraphs
        If oPara.Range.Bold = True Then
            If Not oPara.Range.End = ActiveDocument.Range.End Then
                Set oRng = oPara.Range.Next.Paragraphs(1).Range
                If oRng.Bold = False Then
                    sText = oRng.Text
                    oRng.Select
                    XXXX
                End If
            End If
        End If
    Next oPara
lbl_Exit:
    Exit Sub
End Sub
Using the above code at point XXXX I want
Userform1.Show
and need to pass oRng.text and Opara.Range.Text to the Form (so I can edit them at the Form).

Thanks for any help.
Reply With Quote