Change Dim to Private Quick Fix

Replaces the Dim keyword with Private in a module-scoped declaration.

This quick-fix is available for the ModuleScopeDimKeyword inspection

Applicability

This quick-fix can be applied as a single operation at the following scopes:
  • Module
  • Project

Examples

 This example depicts the state of module(s) before and after applying the quick-fix.

Before
Module1 (Any)
Dim thing As Long Public Sub DoSomething() Debug.Print thing End Sub
After
Module1 (Any)
Private thing As Long Public Sub DoSomething() Debug.Print thing End Sub

Rubberduck.CodeAnalysis.QuickFixes.Concrete.ChangeDimToPrivateQuickFix.cs (Prerelease-v2.5.2.6174)