ReDim Array Error...

GUIDO22

Registered User.
Local time
Today, 03:20
Joined
Nov 2, 2003
Messages
515
Hi, please see attached... any ideas why I have this error?
Answers on a postcard.... or by Reply...thanks!
 

Attachments

  • acc_error.png
    acc_error.png
    66.8 KB · Views: 116
Change:

Public Sub RedimArray (ByRef theArray As Variant)

To:
Public Sub RedimArray (ByRef theArray):cool:
 
Guido, if you copy that as text into a post, I'll copy it as text into the VBA IDE and test it, but I don't have time to type it all in from a jpg.

Maybe Jimmer's suggestion is sufficient.

Cheers,
 
Thank you both for your suggestions, nearly midnight here.. so will try this tomorrow.
 
According to Access help...
>>If you pass an array to a procedure by reference, you can't redimension the array within the procedure.

So the Subroutine that I had for (ReDim)ing the array is now a function - returning a Variant() array.

This now works as hoped...thanks all for your input!
 
Last edited:

Users who are viewing this thread

Back
Top Bottom