Attribute Issues

Pestomania

Active Member
Joined
May 30, 2018
Messages
332
Office Version
  1. 365
Platform
  1. Windows
Hi! Whenever I dim an attribute to "shape" it makes it captialize weird. Say I type "dim shp as shape" it returns this "Dim shp as sHape"

Anyone know why it would capitalize the "H"?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
It sound like at some point you have used sHape as a variable, or the name of a procedure.
 
Upvote 0
Add this line to any module and then delete it:

Code:
Dim Shape
 
Upvote 0
To amplify: In VBA, the last declaration of a variable sets the capitalization for all variables, procedures, objects, properties, methods, and enumerations of the same name project-wide. “Last declaration” includes declarations in the signature of procedures, e.g.,

Code:
Function myFunc(bob As String) As Variant

As a result, it’s impossible to have in the same project a variable, object, property, method, or enumeration named Bob and another named bob.

So if you see

Code:
ActiveWorkbook.name

just enter and delete one line anywhere in the project:

Code:
Dim Name

It will change the case of all appearances of the word project-wide.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,171
Members
453,021
Latest member
Justyna P

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