After selecting a range of cells—either programmatically or by the user—you can prompt the user to choose a background pattern or fill color for that range.
Example:
Sub SelectBackgroundPattern()
Dim success As Boolean
' Select the cell range A1:C3 on the worksheet "Sheet1"
ThisWorkbook.Worksheets("Sheet1").Range("A1:C3").Select
' Show the built-in Excel "Patterns" dialog for fill formatting
success = Application.Dialogs(xlDialogPatterns).Show
' If the user cancels without selecting a pattern, show a message
If Not success Then MsgBox "No pattern was selected"
End Sub

Explanation:
- The constant xlDialogPatterns opens Excel’s built-in dialog box for cell fill patterns and colors, found under the Fill tab in the Format Cells dialog.
- If the user clicks OK, the selected cells are formatted with the chosen background pattern or fill color.
- If the user cancels the dialog, the variable success is False and a message box informs the user that no pattern was applied.