Solved

Double Space in RTB

Posted on 2004-09-20
2
240 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

786 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