Forum Discussion

itsmatta's avatar
itsmatta
Copper Contributor
Sep 06, 2022

Excel VBA Object Populate Cell

Hi! I have a bunch of objects for a visual representation that I can select and mark certain colors using macros. I just wanted to see if I mark a certain object can I have it auto populate a cell with certain data.

 

Sub Fabric()
'
' Fabric Macro
'
' Keyboard Shortcut: Ctrl+w
'
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 32, 96)
        .Transparency = 0.5
        .Solid
    End With
    With Selection.ShapeRange.Fill
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 32, 96)
        .Transparency = 0.5
        .Solid
    End With
End Sub

 

 

Resources