Hello:
I experienced some VBA erratic results from an application I just developed due to a company's abbreviation.
Column 1 has the company three letter abbreviation.
Column 2 has the address
Column 3 and others have additional information.
I build an array of all company abbreviations which I search during the program.
One of the company abbreviations is "SUM" for Summit Bank.
I use a number of tables and arrays to manipulate the data for each company. When the program references company "SUM", it fails without warning.
I realize it is a reserved word but if it is just used as a company abbreviation, why would it fail? To test this, I processed hundreds of 3-letter abbreviations, and as soon as it reaches "SUM", it fails.
Any ideas?
Regards,
Rich Locus
Issue With Using Function Names As Data
-
- 2StarLounger
- Posts: 167
- Joined: 03 Oct 2015, 00:30
-
- Administrator
- Posts: 78558
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- 2StarLounger
- Posts: 167
- Joined: 03 Oct 2015, 00:30
Re: Issue With Using Function Names As Data
Hans:
Thanks for the reply.
It is extremely complex to describe all the details of how the abbreviation is used, so I changed the account abbreviation to "SUMM" and it fixed the problem. I never referred to the abbreviation "SUM" other than adding it to arrays, moving it to rows in a worksheet, and searching it. I never included it in any computations.
So, go ahead and retire this issue. I would have to write a long and involved explanation, so as long as I fixed it by changing the name, I'm good.
Thanks!
Rich
Thanks for the reply.
It is extremely complex to describe all the details of how the abbreviation is used, so I changed the account abbreviation to "SUMM" and it fixed the problem. I never referred to the abbreviation "SUM" other than adding it to arrays, moving it to rows in a worksheet, and searching it. I never included it in any computations.
So, go ahead and retire this issue. I would have to write a long and involved explanation, so as long as I fixed it by changing the name, I'm good.
Thanks!
Rich