title: VBA- Types of variables defined in an odd way
body: <p>I defined few variables with these lines:</p>
  
  <p><code>Dim RAM, VRAM, Storage, Budget As Integer</code> </p>
  
  <p><code>Dim CPU, GPU As String</code></p>
  
  <p>Now I try to call a function which is defined like this:</p>
  
  <p><code>Sub PCBuilder(CPU As String, GPU As String, RAM As Integer, Storage As Integer, VRAM As Integer, Budget As Integer)</code></p>
  
  <p>When I try to run the code i get an error "ByRef argument type mismatch"</p>
  
  <p>I noticed that only GPU and Budget have the right type, the other variables are defined as Variant.</p>
  
  <p>Why is this happening and how can i fix it?</p>