In VBA, why do things like ACTIVESHEET not display all the options tha are available when you type it like most other commands?

Loun

New Member
Joined
Dec 29, 2012
Messages
28
Hi All,

I'm currently trying to learn VBA, but have a question.

If, for instance, I type in Range("A1").

Then after I put the period it will bring up a range of options, so I would select 'Interior' and then another list drops down of all the possibiltiies.

However, if I want to do anything with activesheet, for example, I get no options appear?

An example is activesheet.tab.colorindex = 4

To change the tabs colour, however, when you type in activesheet. no option appear? Can anybody explain why this is or the best way to find out the options? It is quite difficult to know what command I need to use when I can't see any of the options!

Just a bit puzzled as to some appear and others don't?

Thanks,
Lou
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
ActiveSheet could be either a Worksheet or a ChartSheet. So it's declared as generic type object and doesn't have any methods or properties for Intellisense to display. You may not like it, but that's why it is the way it is.
 
Upvote 0
I've often wondered about a similar circumstance?

This produces Intelli-sense
Range("A:A").Find(

This does not
Columns("A").Find(
 
Upvote 0
I've often wondered about a similar circumstance?

This produces Intelli-sense
Range("A:A").Find(

This does not
Columns("A").Find(

Hi Peter

Not exactly on topic, but a remark (that you probably know but can be used by others):
Columns("A"), and it's sister Cells(2, 3) don't give you the intelli-sense, that is especially annoying in the latter case that we use a lot.

What I usually is to write the method without the parameters, like:

Columns().
Cells().

this invokes intelli-sense and then I go back and add the parameters.
 
Upvote 0
Yes, PGC, I usually do

Range("A1").Find(

to complete the 'Find' parameters with intelli-sense and then go back and change the Range("A1") to Columns(..) or Rows(..) as desired.
A bit annoying, but bearable. :)
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,203,094
Messages
6,053,507
Members
444,667
Latest member
KWR21

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