Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10022

Re: Set "Show Levels" via macro

$
0
0

Hi John,

 

a standard VBA function is not available for that.

 

One chance to do that is to differentiate the levels with the applied cell styles.

A hierarchy node has the style "SAPHierarchyCell{No}". {No} stands for the level number.

 

With the VBA code

 

Sub FindaStyle()

    Dim oCell As Range

    ocell = Worksheets(1).Range("DS_1")

    ForEach oCell In oSh.UsedRange.Cells

          If oCell.Style Like "SAPHierarchyCell*" Then

              'do your custom check here

              Stop

          EndIf

    Next

EndSub

 

you can find out if a specific range contains the specific style.

 

Regards

 

Thorsten

 


Viewing all articles
Browse latest Browse all 10022

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>