Thread: DIm Variables
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default DIm Variables

Todd,

No you cannot.

In the example you give, all except Exmpl1Variable are type Variant. Each
variable has to be explicitly typed.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Todd Huttenstine" wrote in message
...
Hey guys I have 70 variables. Each one of these variables
is equal to a DataField in a PivotTable.

I am creating a variable for each field so I can
programmatically control them from a listbox.

Now because I have 70 fields I need 70 variables. What
should I set the variable to and how should I do it with
the least amount of code. Many times I have seen the
following for example:

Dim ExmplVariable as Object, ExmplVariable2, ExmplVariable3

Can I do this all on one line and do I have to use "as
object" for each variable or can I do it only once?

Thanks
Todd Huttenstine