Uppercase Property

hicksi

Board Regular
Joined
Mar 5, 2012
Messages
222
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
"Something" in my VBA has changed the case of DESCRIPTION in my code for standard properties.
Ie, my code that formats an error now contains Err.DESCRIPTION.

I don't know how or why this has occurred, but is a way to correct it. Going through and removing all instances, closing and re-opening and uncommenting the removed code simply changes back to the Uppercase.

It's not a CRITICAL problem, but I share code containing this between projects, and don't want it propagating through other projects.

Is there a way to "fix" this problem, possibly by removing and reinstating a reference or control?
 
That happens when, on some occasion, you declared a variable called DESCRIPTION with capital letters. Maybe in some module you have it that way.
Look for that statement.
If you can't find it, simply in a module, in a macro, declare any variable as Description
For examle:

VBA Code:
Dim Description As String

And that's it, the name will be the first capital letter again.

In the future, try not to use reserved words in variable declarations.
 
Upvote 0
Solution
Yep. You are right. I have no idea when the variable got created. It IS a text value that I am testing, so maybe at some time the quote-marks surrounding it were interpreted as a variable name.

Anyway THANKS.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top