Remove Explicit Call Statement Quick Fix

Makes a call statement implicit by removing the 'Call' keyword, adjusting argument list parentheses accordingly.

This quick-fix is available for the ObsoleteCallStatement inspection

Applicability

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

Examples

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

Before
Module1 (Any)
Option Explicit Public Sub DoSomething() Call DoSomethingElse(42) End Sub Private Sub DoSomethingElse(ByVal value As Long) Debug.Print value End Sub
After
Module1 (Any)
Option Explicit Public Sub DoSomething() DoSomethingElse 42 End Sub Private Sub DoSomethingElse(ByVal value As Long) Debug.Print value End Sub

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