473,383 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to do the selected text bold,italic,change the color etc?

Ajay Bhalala
119 64KB
It's urgent please help. It's deadline is tomorrow morning, please help.

I have a form. The following controls are used in this form...
• Rich Text-box
• 4 Buttons
Bold
Italic
Red
Blue

On button click, the selected text of rich textbox should be change.

How can I change the text color in red or blue on button click?

It's urgent please help. It's deadline is tomorrow morning, please help.
Nov 14 '14 #1

✓ answered by twinnyfo

VBA is Visual Basic for Applications. It is essentially VB 4/5/6, but it is directly tied into certain applications such as MS Access, Excel and Word. It is the standard programming language for automating process is those applications. I believe it is essentially the same as VB 4/5/6, but I admit that I do not work with standalone VB, but much of the same language and coding processes apply.

Hope this hepps!

9 1656
twinnyfo
3,653 Expert Mod 2GB
The basics are this:

Expand|Select|Wrap|Line Numbers
  1. Me.[TextBoxName].ForeColor = RGB(255, 0, 0)
Will change the font color of the text box to red.
Nov 14 '14 #2
Ajay Bhalala
119 64KB
I already done as above, but this changes the whole text color and I want to change the color of selected text only. How can this possible?
Nov 15 '14 #3
twinnyfo
3,653 Expert Mod 2GB
I do not know how to change individual portions of the text using VBA.

Sorry.
Nov 19 '14 #4
Ajay Bhalala
119 64KB
Ok and thank you so much for the reply.
Nov 21 '14 #5
twinnyfo
3,653 Expert Mod 2GB
Glad I could be of assistance!
Nov 24 '14 #6
Ajay Bhalala
119 64KB
I have a question about VBA which you write in your reply.
Can I Know what is VBA?

Please don't mind because I am SY BSC IT student, so I don't know more about vb.net. I heard the word VBA first time. So I want to know about VBA. Can you give me information about VBA?

And again thank you for your help and your reply.
Nov 25 '14 #7
twinnyfo
3,653 Expert Mod 2GB
VBA is Visual Basic for Applications. It is essentially VB 4/5/6, but it is directly tied into certain applications such as MS Access, Excel and Word. It is the standard programming language for automating process is those applications. I believe it is essentially the same as VB 4/5/6, but I admit that I do not work with standalone VB, but much of the same language and coding processes apply.

Hope this hepps!
Nov 26 '14 #8
Ajay Bhalala
119 64KB
Thank you for the giving information.
Nov 26 '14 #9
twinnyfo
3,653 Expert Mod 2GB
Glad I could be of some assistance!
Nov 26 '14 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Imaya Kumar | last post by:
Hi, i'm developing an editor in VS.NET using Rich Text Box Control. I need to make a selected text Bold. how can i do this? also i will have an Italic Button too. If i click Bold button the...
4
by: Dru | last post by:
Hi, I am making a textarea for people to add/modify their text for descriptions products. I want to have buttons (or just text links) with functions that will allow them to bold, italicize, sup,...
3
by: gooderthanyou | last post by:
I have a textfield and you of course you can select text... When they hit the bold button I want it to obtain the selected text and bold it, the hard part is trying to figure out if javascript...
2
by: Adam Honek | last post by:
Okay, Assinging the font and its style (bold, italic etc.) using the font dialog is easy such as: FontDialog1.ShowDialog() txtEmailBody.SelectionFont = FontDialog1.Font But how does one...
6
by: andreas | last post by:
A selected text has fontstyles like bold and italic and underscore I want to remove one of them without changing the other fontstyles. How to do that? Thanks for any response
2
by: suvarna1026 | last post by:
Can any one tell me,how to change color of selected text.Color should be picked from colorPalette.I know only one thing that,as it is client side event,it can be done in javascript.I am using asp.net...
3
by: sudhivns | last post by:
Hi, following is the part of my xml file. data.xml <Value> This is normal text This has to be printed in bold. This has to be printed in Italic. This has to be printed in bold/italic.
2
by: r_ahimsa_m | last post by:
Hello, I am learning CSS and other WWW technologies. In the folowing definition italic doesn't work: h2 { color: Brown; text-decoration: italic; }
0
by: bettiahamit | last post by:
here i created sequence no. with every paragraph line .. like... <p local_id = P-100>aaaaaaaaaaaaaaaaaaaaaaaaa<\p> <p local_id = P-101>bbbbbbbbbbbbbbbbbbbbbbbbb<\p> <p local_id =...
1
by: Patrick Shin | last post by:
I'm trying to make a text that keeps on changing color, let say about every 5 seconds. I'm actually new at JavaScript and I can't seem to grasp what needs to be done. The text should keep on changing...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.