Invalid qualifier error

rjplante

Well-known Member
Joined
Oct 31, 2008
Messages
566
Office Version
  1. 365
Platform
  1. Windows
I have the code posted below and when it runs, it flags with and Invalid Qualifier error. I don't know why it is doing so. It highlights the title of the macro in yellow, and has the Ftr in the With statement also highlighted selected. Any ideas would be great.

Thanks,

Robert

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    Dim Ftr As String
    
    ActiveSheet.PageSetup.RightFooter = "Machine:  " & Sheets("Safety").Range("M1").Value
    
    Ftr = ActiveSheet.PageSetup.RightFooter.Text
    
    With Ftr.Font
        .Name = "Calibri"
        .FontStyle = "Bold"
        .Size = 18
    End With
        
End Sub
 
Last edited:

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Try this

Code:
    Dim Ftr As String
    Ftr = "Machine:  " & Sheets("Safety").Range("M1").Value
    ActiveSheet.PageSetup.RightFooter = "&""Calibri,Bold""&18" & Ftr

You could have recorded a macro to learn this method :)
 
Upvote 0

Forum statistics

Threads
1,214,596
Messages
6,120,438
Members
448,966
Latest member
DannyC96

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