View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Duplicate declaration in current scope, but not so

Bart,
It appears that you're passing data and settings. Normally I pass the
settings in an array that the routine parses via enums to the relative
positions...

Sub ArrayToSheet(vData, vSettings)

While it shouldn't matter how many args the routine requires, it may be
that vArray has larger scope outside the routine.

Of course, I don't do this as you are here. Instead, I 'dump' the data
into a target range then run a separate routing to do sheet setup. This
is a standard approach for app sheets that the user accesses. Report
sheets are usually pre-formatted templates (depending on layout), but
if not using a template the sheet setup happens independantly as I
described.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion