Reputation: 6984
Typing 'Activesheet.' will not bring up a list of suggestions whereas other classes will. How do I bring up this autosuggestion screen in the coding screen as I am typing?
Upvotes: 2
Views: 5225
Reputation: 2059
In Excel, typing ActiveSheet
is invoking a property of the default object, Excel.Application . If you are working in Access (based on your tags), the default object is Access.Application, which doesn't have an ActiveSheet property. Instead, Access, will see ActiveSheet
as an undimensioned variant variable. To get the Intellisense that you seek, you must:
or (from @dee)
Dim someSheet As Worksheet 'As Excel.Worksheet in Access
Set someSheet = ActiveSheet 'As Excel.ActiveSheet in Access
'use someSheet, there you have intellisense
If you type Option Explicit
at the top of your module, you'll get a helpful compile error when you refer to something that doesn't actually exist or is mis-spelled, instead of accidentally declaring a new variable.
Upvotes: 3