Results 1 to 3 of 3

Thread: [RESOLVED] ReDIm an internal element of a UDT

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Fort Worth, Texas, USA
    Posts
    264

    Resolved [RESOLVED] ReDIm an internal element of a UDT

    Hi,

    I'm trying to ReDIm an internal element of a UDT.

    Here is my UDT:

    Code:
    Private Type datar
        RecordNumber As Long
        RealDate As String
        RealTime12Hr As String
        RealTime24Hr As String
        AccumTime As Double
        DecimalTime As Double
        YValue(8) As Double
        XValue As Double
    End Type
    
    Private Type grfXdatar
        DataArray(10) As datar
    End Type
    
    Public XDataArray(8) As grfXdatar

    I need to ReDim the DataArray(10) to DataArray(600)
    When I try:
    Code:
    ReDim XDataArray(cc).DataArray(600)
    I get an "Array already dimensioned" error.

    Any ideas?

    Thanks!

  2. #2
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,121

    Re: ReDIm an internal element of a UDT

    Make the array dynamic, so it has to be resized before use and can be resized in the future.
    Code:
    Private Type grfXdatar
        DataArray() As datar
    End Type

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Fort Worth, Texas, USA
    Posts
    264

    Re: ReDIm an internal element of a UDT

    Thank You passel!

    That Fix it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width