How to change Background Color of Cell Range

Post Reply
mikhail_a
Posts: 1
Joined: Sun Dec 06, 2020 9:03 am

How to change Background Color of Cell Range

Post by mikhail_a »

I am a Delphi developer.
My application has a function to import data into Excel.
I want to add a data import function to PlanMaker.
I have successfully implemented this feature but I have not found a way to change the cell color.
For example, the code "Sheet.Range ['A1: C1']. Font.BColorIndex: = 15;" changes the background of the text successfully.
However, the code "Sheet.Range ['A1: C1']. BColorIndex: = 15;" is wrong.
How do I change the color of a cell?
SuperTech
SoftMaker Team
SoftMaker Team
Posts: 3185
Joined: Wed Mar 11, 2020 5:31 pm

Re: How to change Background Color of Cell Range

Post by SuperTech »

Please try this code

Code: Select all

Sheet.Range("A1:C1").Shading.ForegroundPatternColorIndex = 15
Post Reply

Return to “BasicMaker 2018 for Windows”