+ Reply to Thread
Results 1 to 6 of 6

format a string as bold

Hybrid View

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Excel 2010
    Posts
    4

    Talking Re: format a string as bold

    Got it
    Public lLastRow As Long
    Public CharcoalText As String
    Public AR_Text As String
    Public GRAN_Text As String
    Public FINE_Text As String
    Public LoadText As String
    Public OvenText As String
    
    
    
    
    Function Charcoal_Check()
    AR_Text = "AR "
    GRAN_Text = "G"
    FINE_Text = " F"
    
    If AR_NU Then AR_Text = "   "
    
    If G_NU Then GRAN_Text = " "
    
    If F_NU Then FINE_Text = "  "
    
    
    CharcoalText = AR_Text & GRAN_Text & FINE_Text
    
    
    
    End Function
    Function Ch_Txt_Bold()
    If AR_P = True Then
    ActiveSheet.Cells(lLastRow + 6, 3).Select
    With ActiveCell.Characters(Start:=1, Length:=3).Font
        .FontStyle = "Bold"
    End With
    End If
    If G_P = True Then
    ActiveSheet.Cells(lLastRow + 6, 3).Select
    With ActiveCell.Characters(Start:=4, Length:=2).Font
        .FontStyle = "Bold"
    End With
    End If
    If F_P = True Then
    ActiveSheet.Cells(lLastRow + 6, 3).Select
    With ActiveCell.Characters(Start:=6, Length:=1).Font
        .FontStyle = "Bold"
    End With
    End If
    End Function
    
    Function LoadCheck()
    If LD_LOW = True Then LoadText = "LOW"
    If LD_MED = True Then LoadText = "MED"
    If LD_HIGH = True Then LoadText = "HIGH"
    End Function
    Function OvenCheck()
    If FrontOvenBox = True Then OvenText = "FRONT"
    If AllOvenBox = True Then OvenText = "ALL"
    End Function
    
    
    
    Sub Add_Button_Click()
    
    UserForm1.Charcoal_Check
    UserForm1.LoadCheck
    UserForm1.OvenCheck
    
    lLastRow = ActiveSheet.ListObjects("Table1").ListRows.Count
    ActiveSheet.Cells(lLastRow + 6, 1).Value = UserForm1.CodeText.Value
    ActiveSheet.Cells(lLastRow + 6, 2).Value = UserForm1.GradeText.Value
    ActiveSheet.Cells(lLastRow + 6, 3).Value = CharcoalText
    UserForm1.Ch_Txt_Bold
    ActiveSheet.Cells(lLastRow + 6, 4).Value = LoadText
    ActiveSheet.Cells(lLastRow + 6, 5).Value = OvenText
    ActiveSheet.Cells(lLastRow + 6, 6).Value = UserForm1.CommentsText.Value
    
    ' Module1.Sort
    
    End Sub
    
    
    
    
    
    
    
    Private Sub CancelButton_Click()
    Unload UserForm1
    End Sub
    
    Private Sub Done_Button_Click()
    Unload UserForm1
    End Sub
    Works perfect!

    I just needed a sounding board... Thanks.

  2. #2
    Registered User
    Join Date
    11-25-2011
    Location
    Lilydale, Victoria, Australia
    MS-Off Ver
    2013 (365)
    Posts
    63

    Re: format a string as bold

    Nice work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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