Excel VBA Array (3d) Novice -


I am trying to populate a 3D array and (at this point) just return it to msgbox, The data I want is in the colums of the array 9, 15 and 16 and will be like ...

2342341234, 01/01/1969, 18:00

I Keep an eye out for mismatch or not, why fathom, please help, you can, welcome all suggestions as I am a novice on this thing

  Integer in global form Purna CINO Global LastOrOfData option as the Global NumberOfRows Integer Global FirstRowOfData as the integer 'line loop global HospNo () integer global TRCDate as I date (date) as the global TRCTime () date Global MonthArray (HospNo , TRCDate, TRCTime), with the sub CreateMonthArray () FirstRowOfData = 1 ActiveSheet LastRowOfData = Range (.arange ("A1"), Range ("A65535"). (And xlUp). For the end calculations (HospNo, TRCDate, TRCTime) with the slow MonthArray, do I do the FirstArrayOfRo numberOfRows = for MonthArray = (ActiveSheet.Cells (i + 1, 9. Value) Let's MonthArray (TRCDate) = ( ActiveSheet.Cells (i + 1, 15) .Value) MonthArray (TRCTIME) = Walk (ActiveSheet.Cells (i + 1, 16) .Value) MsgBox MonthArray (HospNo (i), TRCDate (I), TRCTime (i) ) Next I end sub  

Many thanks.

This is not a complete discussion of how to create and generate a 3D array of these values, rather point to it That your errors are in the code that you have presented, which is making just one line.

I suspect that your mistake falls on Global or Dim month's statement. In VBA, there is no "Named" argument in the array, if you have this problem, then you can try something like this:

  Variable as the global month and date (0 to 2)  

And then, in your code:

  MonthArray (0) = (ActiveSheet.Cells (i + 1, 9) .Value) MonthArray (1) = (ActiveSheet .Cells (i + 1, 15) .Value) MonthArray (2) = (ActiveSheet.Cells (i + 1, 16) .value)  

If you want to use nominated logic (Which can be really convenient for debugging, you might define class object

In VBA, I usually use not public and global; and you remove your duplicate declaration of MonthArray in the body of your code Also, Let statement is optional

.. You also need to make sure that your numberFRO variable is set to something at a price. It is not set to anything within this module, but because it is a public variable, Au Set can.

Finally, you MsgBox statement should access the index number of the data Mahinaarere EG:

  MsgBox MonthArray (0) & Amp; "," & Amp; Month Hour (1) & amp; "M" & amp; Month Aurer (2)  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -