Problem with auto list members in VBA


B

Blegos

Ok i have a problem with auto list members in Visual
Basic Editor, when i record macro in excel it write me in
module1 a line

VB CODE:
Sheets("Sheet2").Select

ok when i try to write

VB CODE:
Sheets("Sheet2").

and then press "CTRL+SPACE"
wont't show list members. I need this.
I choose the excel 10 reference,......
 
Ad

Advertisements

D

Dave Ramage

Auto list members does not work with the Sheets method
(for some reason?) or Worksheets(..) or several other
methods.

An alternative is to use the sheet's object name as seen
in the object tree view. Note that this may be different
to the tab name for the sheet.

E.g.
Sheet1.Activate

Cheers,
Dave.
 
D

Dave Peterson

I sometimes declare a variable just so I can get that help.

Dim wks as worksheet
set wks = worksheets("sheet2")
wks.
that dot will cause good things to happen.
 
Ad

Advertisements

Joined
Jul 6, 2020
Messages
1
Reaction score
0
Hi Dave,
I Wrote the code same as you mentioned, initially it was showing auto list members, later on auto list of members is not showing for declared variable, but it is performing the action it meant to, now i am confused that why display of auto list of members is disabled and whether to continue the program since it is working for what it is meant to.


But i am eager to know about the reason for changes in displaying auto list of members.

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top