+ Reply to Thread
Results 1 to 2 of 2

Partial Formatting of Header Text

Hybrid View

  1. #1
    Registered User
    Join Date
    10-30-2019
    Location
    Canada
    MS-Off Ver
    365
    Posts
    1

    Partial Formatting of Header Text

    Hello,

    So I 'm not sure if this is possible. I am trying to pulling data from two separate text boxes and have them italicized and placed into the header of my sheet. My code is as follows:

    Private Sub CommandButton1_Click()
    ActiveSheet.PageSetup.RightHeader = "&BTitle&B" & Chr(10) & TextBox1.Text & Chr(10) & TextBox2.Text & " " & ComboBox1.Text
    UserForm1.Hide
    End Sub
    I have noticed that the basic &I command doesn't work on the textbox commands. I was thinking about italizing the entire header, however, I need the "Title" to remain bold and uninitialized. Thanks for your help!

    Cheers,

    Emerson

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Partial Formatting of Header Text

    Perhaps like this?

    ActiveSheet.PageSetup.RightHeader = "&""-,Bold""Title&""-,Regular""" & Chr(10) & "&""-,Italic""" & TextBox1.Text & Chr(10) & TextBox2.Text & " " & ComboBox1.Text
    WBD
    Office 365 on Windows 11, looking for rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Automatic partial formatting of text between certain values
    By schjacob in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-07-2019, 02:56 AM
  2. Conditional Formatting with Partial Text Match
    By randolaw in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-31-2018, 04:30 PM
  3. Conditional Formatting that contain text and partial
    By nathanexcelhelp in forum Excel General
    Replies: 4
    Last Post: 02-17-2017, 09:26 AM
  4. Conditional Formatting: Matching Partial Text
    By Alan_Bernardo in forum Excel General
    Replies: 1
    Last Post: 01-07-2017, 02:23 PM
  5. [SOLVED] Conditional Formatting based on partial/specific text to highlight entire row
    By bizdevdfw in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-18-2016, 04:32 PM
  6. Conditional formatting based on search of partial text column
    By SirBrock in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-12-2015, 09:49 AM
  7. Replies: 11
    Last Post: 02-04-2015, 01:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1