ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem with auto list members in VBA (https://www.excelbanter.com/excel-programming/276354-problem-auto-list-members-vba.html)

Blegos

Problem with auto list members in VBA
 
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,......


Dave Ramage[_2_]

Problem with auto list members in VBA
 
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.
-----Original Message-----
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,......

.


Dave Peterson[_3_]

Problem with auto list members in VBA
 
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.

Blegos wrote:

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,......


--

Dave Peterson



All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com