What name range cannot be used on VBA?

alee001

Board Regular
Joined
Sep 9, 2014
Messages
154
Office Version
  1. 2010
Platform
  1. Windows
I was define some name range on cell or area on worksheet, but they cannot be used on code as like:

Range("Time") on cell; [Time] on code
Range("Type") on cell; [Type] on code
Range("Name") on cell; [Name] on code

I found that if auto form uppercase on name which cannot be used on code. Are there other word restrictions that cannot be used? Thanks
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Generally, its best to avoid using names that are either keywords or cell addresses or the names of functions.

I think that your problem might also be with the bracket (evaluation) notation.
Range("Time") looks for a range named time.
[time] tries to evaluate the string "=time" which Excel can't decide if its a name or a malformed formula.
 
Upvote 0
Generally, its best to avoid using names that are either keywords or cell addresses or the names of functions.

I think that your problem might also be with the bracket (evaluation) notation.
Range("Time") looks for a range named time.
[time] tries to evaluate the string "=time" which Excel can't decide if its a name or a malformed formula.

Thanks, Is there a list of names that I can't use to get my attention?
 
Upvote 0

Forum statistics

Threads
1,215,494
Messages
6,125,137
Members
449,207
Latest member
VictorSiwiide

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