Attribute Issues

Pestomania

Active Member
Joined
May 30, 2018
Messages
292
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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

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