Solved

Double Space in RTB

Posted on 2004-09-20
2
237 Views
Last Modified: 2010-05-02
Does anyone know how to doublespace lines in a RTB  lso i just want to double space the lines i have selected.

example..

line1
line2
line3

becomes

line1

line2

line3
0
Comment
Question by:BI5HOP
2 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 250 total points
ID: 12104478
How about


Private Sub rtfText_KeyDown(KeyCode As Integer, Shift As Integer)
If (KeyCode = 13) Then
    If (Len(rtfText.SelText) > 0) Then
        Debug.Print Replace(Replace(rtfText.SelText, vbCrLf & vbCrLf, vbCrLf), vbCrLf, vbCrLf & vbCrLf)
        KeyCode = 0
        rtfText.SelText = Replace(Replace(rtfText.SelText, vbCrLf & vbCrLf, vbCrLf), vbCrLf, vbCrLf & vbCrLf)
    End If
End If
End Sub
0
 

Author Comment

by:BI5HOP
ID: 12105513
I had to make a small change since i wanted it on rightclick i forgot to mention that but yea it worked great thanks :)

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now