Getting "Unable to set the bold property of the font class" error

PoggiPJ

Active Member
Joined
Mar 25, 2008
Messages
330
I am suddenly getting the same error on my own Excel 2003 code, which has been unchanged and working for the past 2 years now.

  • I am also getting the "Not enough system resources to display completely" message just prior, but I am not certain that it is related.
  • This particular user also makes extensive use of fonts and colors throughout the workbook, and I don't know if we are hitting some internal limitation.
  • If I comment out the offending (red) statement, it will fail on a following font setting statement, such as "size".
Code:
    'Activate the Schedule A sheet
        Sched_A.Activate
        Sched_A.Unprotect Password:=DMSS.PW
        Sched_A.UsedRange.Clear
    
    'Check to see if the user has opted to display Schedule A
        If Configuration.Range("cfgWrkshtSchedA") Then
        Else
            Configuration.Range("cfgWrkshtSchedA") = True
        End If

    'Build the Customer name
        ActiveSheet.Cells(3, 4).Select
        Selection.Formula = "='Customer Data'!$B$2"
        [COLOR=Red][B]Selection.Font.Bold = False[/B][/COLOR]
        Selection.Font.Size = 18

Anyone have any suggestions?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try eliminating as many "select" and "Selection"s as possible:

Code:
        With Sched_A
            .Unprotect Password:=DMSS.PW
            .UsedRange.Clear
    
    'Check to see if the user has opted to display Schedule A
            If Configuration.Range("cfgWrkshtSchedA") Then
            Else
                Configuration.Range("cfgWrkshtSchedA") = True
            End If
    'Build the Customer name
            With .Cells(3, 4)
                .Formula = "='Customer Data'!$B$2"
                .Font.Bold = False
                .Font.Size = 18
            End With
        End With
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top