Rubberduck: Else If inside a Select Case does not align correctly

Created on 18 Jan 2017  路  3Comments  路  Source: rubberduck-vba/Rubberduck

(originally reported on RubberduckWeb)

I have an If with multiple Else Ifs inside of a Select Case inside of a For loop.

The indenter is mis-aligning the Else Ifs and everything else below with Case. The actual code is much longer, but I think this reflects the issue. Below is the code after running the Indenter...

vb For CurrentRow = 9 To MaxRows - 1 Select Case .Cells(CurrentRow, "A") Case "[b]", "[f]", "[h]", "[t]" 'Not a data row - skip Case "fMTCnty" 'Do Stuff Case Else If Mid(ReportName, 3, 1) = "r" Then iMult = -1 ElseIf ReportName = "SRadj" Or ReportName = "SRoth" Then iMult = -1 ElseIf ReportName = "RBbarr" Then iMult = -1 Else iMult = 1 End If wsData.Calculate 'More Stuff End Select Next iRow

bug feature-smart-indenter

Most helpful comment

Just updated, and it is indenting as would be expected. Sorry for the false alarm.

All 3 comments

Config file below
rubberduck.config.txt

I'll update, I'm currently on 2.09....and test.

Ah, it's probably fixed already then - @comintern's current build seems to indent accordingly with specified indenter settings (ref. comment).

Just updated, and it is indenting as would be expected. Sorry for the false alarm.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SteGriff picture SteGriff  路  3Comments

ThunderFrame picture ThunderFrame  路  3Comments

Hosch250 picture Hosch250  路  3Comments

ChrisBrackett picture ChrisBrackett  路  3Comments

bclothier picture bclothier  路  3Comments