This is a holistic type question.
If I had a dynamic array of string variables, can these be stored within Visual Basic Editor? Rather than a hidden worksheet or text file.
This is a holistic type question.
If I had a dynamic array of string variables, can these be stored within Visual Basic Editor? Rather than a hidden worksheet or text file.
If the array needs to be dynamic, where would it get the values to begin with?
Not sure what you mean by dynamic... but you can store in VBE like.
![]()
Sub Demo() Dim ar ar = Array("Something", "SomethingElse", "Cheese") 'Add more item as desired 'Alternately Dim strAr strAr = Split("Something,SomethingElse,Cheese", ",") 'Add more item to string as needed End Sub
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
― Robert A. Heinlein
It's hard to explain as I don't know how to do it yet, but it will be a list of words which are passed through a spell checker and if passed, the spell check will not query it next time. The words are stored in a dynamic array.If the array needs to be dynamic, where would it get the values to begin with?
For example, if I check strings such as "e = mc^2", initially it will be queried by a spell checker. If I then have an event which approves the sting, it will not be queried the next time a spell check is run.
I was looking to input via Excel, not writing to Visual Basic Editor.Not sure what you mean by dynamic... but you can store in VBE like.
It's technically possible. But since any variable/object is destroyed by garbage collector when it goes out of context...
It will depend on the scope of variable.
If you store in public variable. This can be accessed as long as workbook is open (once closed, it will be destroyed).
To have access to it across instance, you'd need to store it in somewhere else (Ex: worksheet, external file such as txt, registry etc)
Edit: To expand on technically possible part. You can write another module to update module where you want to store something. But this is convoluted process and there are several issues/dangers associated with this. Simply storing it in worksheet is much easier to control and maintain (or in external location).
Last edited by CK76; 09-18-2019 at 10:34 AM.
Assuming that you are using a custom built checker of some sort, then you would have to store those strings somewhere.
OK thanks to both. I will look at storing in a worksheet or text file.
Glad to help & thanks for the feedback
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks