title: MS Access Call/Application.Run Procedure stored as variable not working
body: <p>I have a MS Access form with a listbox with list of procedures. The procedure codes are stored in the form. There's also a button. When clicking a button, I want it to loop through the listbox and run the procedures from the selected items. I'm calling the procedures using Call and Application.Run but both methods are giving errors.</p>
  
  <p>Call 'Compile Error: Expected Sub, Function, or Proeprty<br>
  Application.Run 'MS Access cannot find the procedure 'Name of Procedure'</p>
  
  <pre><code>Private Sub button_Click()
  
  With Me.listbox1
      For Each varItem In .ItemsSelected
          currSub = .ItemData(varItem)
          If Not IsNull(varItem) Then
              Call currSub 'Compile Error: Expected Sub, Function, or Proeprty                
              Application.Run currSub 'MS Access cannot find the procedure 'Name of Procedure'
          End If
      Next
  End With
  
  Sub NameOfcurrSub1()
     'some code
  End Sub
  
  Sub NameOfcurrSub2()
     'some code
  End Sub
  etc.
  </code></pre>