LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default "Type" statement and arrays

I am having difficulty getting a user defined data type to function
with arrays. What I would like to do is create a data type that is
comprised of four 1-D arrays. Then I would like to load the individual
arrays in another module so I can trasnfer all four arrays as a single
argument (the new data type) in a function. Here's what I have done so
far

In one module;

Option Base 1

Public Type PlotScalars

Xscalar(1 To 4) As Integer
Yscalar(1 To 4) As Integer
Zscalar(1 To 4) As Integer

End Type

In another module

Dim MyPlotScalars As PlotScalars

MyPlotScalars.Xscalar = Array(1, 0, 1, 1)
MyPlotScalars.Yscalar = Array(1, 1, 0, 1)
MyPlotScalars.Zscalar = Array(1, 1, 1, 0)

I get an error "Compile error: can't assign to array." I would prefer
not to have to load each element of the data type arrays one element at
a time. Is there an easy way around this?

My main motivation for doing this is to cut down on the number of
arguments passed to a user defined function (which are limited to 30).

TIA

dan

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Type mismatch" when I try to fill an Array variable with "+" [email protected] Excel Discussion (Misc queries) 1 April 17th 07 01:28 PM
how do I type "itis" without Excel putting a space "it is"? Max Excel Worksheet Functions 4 March 18th 07 10:22 PM
Where is the toolbar with the "bold type", "font type", options fwccbcc New Users to Excel 2 May 3rd 06 09:11 PM
Need help in excel with "Statement invalid outside Type block. " error Brent[_6_] Excel Programming 3 January 17th 04 03:03 AM


All times are GMT +1. The time now is 12:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"