473,320 Members | 1,945 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,320 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 1650
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.