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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ajay Bhalala
    New Member
    • Nov 2014
    • 119

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

    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.
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3664

    #2
    The basics are this:

    Code:
    Me.[TextBoxName].ForeColor = RGB(255, 0, 0)
    Will change the font color of the text box to red.

    Comment

    • Ajay Bhalala
      New Member
      • Nov 2014
      • 119

      #3
      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?

      Comment

      • twinnyfo
        Recognized Expert Moderator Specialist
        • Nov 2011
        • 3664

        #4
        I do not know how to change individual portions of the text using VBA.

        Sorry.

        Comment

        • Ajay Bhalala
          New Member
          • Nov 2014
          • 119

          #5
          Ok and thank you so much for the reply.

          Comment

          • twinnyfo
            Recognized Expert Moderator Specialist
            • Nov 2011
            • 3664

            #6
            Glad I could be of assistance!

            Comment

            • Ajay Bhalala
              New Member
              • Nov 2014
              • 119

              #7
              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.

              Comment

              • twinnyfo
                Recognized Expert Moderator Specialist
                • Nov 2011
                • 3664

                #8
                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!

                Comment

                • Ajay Bhalala
                  New Member
                  • Nov 2014
                  • 119

                  #9
                  Thank you for the giving information.

                  Comment

                  • twinnyfo
                    Recognized Expert Moderator Specialist
                    • Nov 2011
                    • 3664

                    #10
                    Glad I could be of some assistance!

                    Comment

                    Working...