Does VBE Intellisense allows us to choose an Excel constant (xl...) from its dropdown list?
For example, regarding the code below, when I type r.
, I can choose Cells
from a drop-down list. Then, typing .int
, I can choose Interior
from a drop-down list. Then, typing .pat
, I can choose Pattern
from a drop-down list. Then, typing =
plus space plus xl
nothing happens.
So, how to choose one of Pattern's constants from VBE Intellisense? Is that possible?
Sub Test()
Dim r As Range
Set r = Selection
r.Cells.Interior.Pattern = xlPatternCrissCross
End Sub
CodePudding user response:
With vba enumerations you have to know the name of the enumeration, then you can get specific members by intellisense. In this case your enumeration is xlPattern to you get get the enumeration using
r.Cells.Interior.Pattern = xlPattern.