Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - In Excel VBA, what is the format of the interior.color value of a cell?
In Excel VBA, what is the format of the interior.color value of a cell?
Is a decimal number format, and queries the value of interior.color.

1. Refer to the table below to query the color index value of a certain color.

2. First, you need to create a button control under the blank page of the EXCEL worksheet. The effect is as follows: Yes.

3. Click the right mouse button to find the specified macro and create a macro module. The operation interface is shown in the following figure:

4. Enter the vbaprojectproject mode, find the module 1 and write the code on the interface of the module 1. The effect is shown in the following figure:

5. The next step is to write code.

SubMsg()

Sheet 1. range ("C2: E6"). Inside. ColorIndex=27

End joint

6. Finally, click the button control to trigger the code, run the result, and display the background color and the code in vba. Inside. ColorIndex = 27