Thread: [Solved] format text with VBA
View Single Post
 
Old 05-26-2020, 09:50 PM
trevorc trevorc is offline Windows 7 32bit Office 2013
Competent Performer
 
Join Date: Jan 2017
Posts: 174
trevorc will become famous soon enoughtrevorc will become famous soon enough
Default format text with VBA

Hi All I'm trying to format a part of text using the code below I'm getting several pieces of information from various cells, with one of them i am trying to make it bold text. Can this be done this way wrapping the code in the format function, the same way i did it with the serial number field. If so how ???
I have tried various syntax and checked online for some help to no avail.
Any assistance is appreciated.
regards
Trevor

Code:
  Set AcRow = ActiveCell.EntireRow
       If Not Intersect(Target, Sh.Range("AK4:AK5000")) Is Nothing Then ' note for online payments
            ActiveCell.FormulaR1C1 = "Date :- " & Date & " , " & Intersect(AcRow, tblColumns("Company Name").Range) & " INV Number :- " & Intersect(AcRow, tblColumns("Xero Invoice Number").Range) & _
            ", Repairs to Clipsal C-bus Wall Unit " & Intersect(AcRow, tblColumns("Part").Range) & " " & " S/N " & _
            Format(Intersect(AcRow, tblColumns("Serial Number").Range), "000000000000") & " On " & Intersect(AcRow, tblColumns("RMA Number").Range)
            Exit Sub
        End If
Reply With Quote