Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
example
Sub test2() 'counts number of comments Dim cmnts As Long cmnts = ActiveSheet.Comments.Count MsgBox cmnts End Sub When I type activesheet. (Notice the period at the end) Why doesn't VBA then automatically show me the properties/methods of Activesheet? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Because the activesheet could be a worksheet a chart sheet, etc., so it
cannot know what to present, so it gives nothing. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Jonathan Cooper" wrote in message ... example Sub test2() 'counts number of comments Dim cmnts As Long cmnts = ActiveSheet.Comments.Count MsgBox cmnts End Sub When I type activesheet. (Notice the period at the end) Why doesn't VBA then automatically show me the properties/methods of Activesheet? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Makes sense. When I started to type that, and nothing happened, I thougth
that there was something wrong with what I was trying to do. thanks. "Bob Phillips" wrote: Because the activesheet could be a worksheet a chart sheet, etc., so it cannot know what to present, so it gives nothing. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Jonathan Cooper" wrote in message ... example Sub test2() 'counts number of comments Dim cmnts As Long cmnts = ActiveSheet.Comments.Count MsgBox cmnts End Sub When I type activesheet. (Notice the period at the end) Why doesn't VBA then automatically show me the properties/methods of Activesheet? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Bob's answer is correct. To get the prompts you want use a variable that has
been DIMmed as a Worksheet, i.e. DIM ws As Worksheet then when you type "ws." you'll get the prompts you seek Duke "Jonathan Cooper" wrote: example Sub test2() 'counts number of comments Dim cmnts As Long cmnts = ActiveSheet.Comments.Count MsgBox cmnts End Sub When I type activesheet. (Notice the period at the end) Why doesn't VBA then automatically show me the properties/methods of Activesheet? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Oops, left out one part
DIM ws as Worksheet Set ws = Activesheet "Jonathan Cooper" wrote: example Sub test2() 'counts number of comments Dim cmnts As Long cmnts = ActiveSheet.Comments.Count MsgBox cmnts End Sub When I type activesheet. (Notice the period at the end) Why doesn't VBA then automatically show me the properties/methods of Activesheet? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel charts, simple question | Excel Worksheet Functions | |||
Simple average question | New Users to Excel | |||
a very simple question | Excel Discussion (Misc queries) | |||
simple Wildcard Question | Excel Discussion (Misc queries) | |||
Simple Question | Excel Worksheet Functions |