On May 4, 8:31 pm, "Norman Jones" <normanjo...@wherforartthou.com>
wrote:
> Hi Caezar,
>
> Try using the Run method which
> takes a string argument.
>
> So replace
>
> > Then Call Supported_Reports(i)
>
> with
>
> Then Application.Run Call Supported_Reports(i)
>
> See VBA help for more information
> on the Run method
>
> ---
> Regards.
> Norman"Caezar" <lcaza...@gmail.com> wrote in message
>
> news:01cf13cf-d3fc-494e-b8f6-(E-Mail Removed)...
>
> > The routine below does not operate as intended, as the Call method
> > does not recognize a variable.
> > Call Supported_Reports(i) does not work.
>
> > How can I change this routine to male it work?
>
> > Thanks!
>
> > Sub Format_Reports()
>
> > Dim Supported_Reports(1) As String
> > Dim i As Integer
>
> > Supported_Reports(0) = "CGE457"
> > Supported_Reports(1) = "SPE962"
>
> > For i = 0 To i = UBound(Supported_Reports)
> > If Not ActiveSheet.Cells.Find(Supported_Reports(i)) Is Nothing
> > Then Call Supported_Reports(i)
> > Next i
>
> > End Sub
Ha, thanks!
|