QP School
Range methods in VBA - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: Excel VBA Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=48)
+--- Thread: Range methods in VBA (/showthread.php?tid=5219)



Range methods in VBA - Qomplainerz - 07-27-2023

Description:

Ranges represent a cell or group of cells in Excel, and they have methods like Value, Font, and Interior.

Example:

Sub ExampleRangeMethods()
    'Write data to a cell
    Range("A1").Value = "Hello, Excel!"

    'Change font color of cell A1 to red
    Range("A1").Font.Color = RGB(255, 0, 0)

    'Change cell background color to yellow
    Range("A1").Interior.Color = RGB(255, 255, 0)
End Sub