Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-08-2022, 01:27 PM
BrianHoard BrianHoard is offline Using .Net arrays in VBA crashes Word Windows 10 Using .Net arrays in VBA crashes Word Office 2019
Advanced Beginner
Using .Net arrays in VBA crashes Word
 
Join Date: Jul 2022
Location: Haymarket, VA USA
Posts: 85
BrianHoard is on a distinguished road
Default Using .Net arrays in VBA crashes Word

We have written several scripts using .Net arrays (forgive me if that's the wrong name, that's what we have been calling them). We are now seeing that Word crashes immediately if certain users try to run these scripts. No warning, no locking up or spinning cursor, Word just closes.

We have found the common problem is that any script where we have used .Net arrays are the culprit. We are using them like this...



Code:
' .net arrays
Dim enDupes_LL as Object

' Create the empty array
Set enDupes_LL = CreateObject("System.Collections.ArrayList")

' We append to this array like this...
enDupes_LL.Add Array(int_master, eNumber, enRefText)

' We can get the size of the array using...
If enDupes_LL.Count == 0  Then
Please let me know your advice how we can either solve the problem to allow these arrays to work on all users computers, or a better approach instead of using them.
I'm guessing that it has to do with what version of .Net a user has installed. But still troubleshooting that.

I recall originally looking into using VBA arrays, but could not see how I would append to them, or get their size, like with using .Count

Thank you for any help.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using .Net arrays in VBA crashes Word How to use arrays? Simplifier Excel 1 09-03-2016 03:50 AM
Create an input box for arrays rajani Word VBA 2 08-17-2015 06:28 AM
Variable arrays from user input SeattleITguy Excel Programming 1 01-29-2015 09:19 AM
Using .Net arrays in VBA crashes Word Searching Arrays without Loops? ptmuldoon Word VBA 3 12-13-2014 11:21 AM
Using .Net arrays in VBA crashes Word re-naming arrays in VBA? JDevsFan Excel Programming 4 03-15-2012 08:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:10 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft