2

I get used to C++/C# environment where you type code and functions/variables can be inserted by selecting them by "TAB".

On daily basis I work on excel/access and atm I'm working on big project. My class module has around 100 variables, mostly strings. Is there any option in VBA to auto fill or suggest variable within class module while writing code? For example:

CurrentWB.Sheets(PDSheet).Select

CurrentWB is set for Workbooks. After dot it doesn't suggest Sheets and after typing brackets it doesn't suggest PDSheet and so on.

Any advise is helfull.

1 Answer 1

3

Any advise is helpful

1-

Always use Option Explicit and Dim your variables explicitly

Dim CurrentWB as Workbook ' Will make the WB methods appear after typing `CurrentWB.`

On the other hand, when you Dim CurrentWB as Object or As Variant (the Variant case is implictly used when you don't use Option Explicit), no intellisense will be available.

2-

In order to have intellisense on variable names, again if you Dim your variables, when you type the firts part of the variable name then you type Ctrl+Space, intellisense will automatically complete it for you if the entered part is unambiguous, or it will prompt show you the possible suggestions.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.