Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Dumb question of the day.

I am relatively new to VBA but am learning fast. One thing that I can't
find the answer to is what is the significance of the (.) in front of a
code.

eg; With ActiveSheet.OptionButtons("Option Button 57")
.Value = Not .Value = xlOn
End With

I cn understand having it between the Not.Value but why is it in the .Value
= etc.

Bewildered semi-Newbie

DennisB


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Dumb question of the day.

The . represents the object in the With statement.

.Value = Not .Value = xlOn

is equivalent to

ActiveSheet.OptionsButtons("Option Button 57").Value = Not _
ActiveSheet.OptionsButtons("Option Button 57").Value = xlOn

Using this notation only requires resolving the object once rather than
twice, as well as being much shorter.



In article ,
"DennisB" wrote:

I am relatively new to VBA but am learning fast. One thing that I can't
find the answer to is what is the significance of the (.) in front of a
code.

eg; With ActiveSheet.OptionButtons("Option Button 57")
.Value = Not .Value = xlOn
End With

I cn understand having it between the Not.Value but why is it in the .Value
= etc.

Bewildered semi-Newbie

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Dumb question of the day.

Hi Dennis,

eg; With ActiveSheet.OptionButtons("Option Button 57")


In the above line:

OptionButtons is the collection of option buttons
"Option Button 57" is a specific option button

and,therefo

ActiveSheet.OptionButtons("Option Button 57")

refers to a control named "Option Button 57", which is a member of the
OptionButtons collection on the active sheet,


---
Regards,
Norman



"DennisB" wrote in message
...
I am relatively new to VBA but am learning fast. One thing that I can't
find the answer to is what is the significance of the (.) in front of a
code.

eg; With ActiveSheet.OptionButtons("Option Button 57")
.Value = Not .Value = xlOn
End With

I cn understand having it between the Not.Value but why is it in the
.Value = etc.

Bewildered semi-Newbie

DennisB




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Dumb question of the day.

..Value within the With / End With statement is equivalent to


ActiveSheet.OptionButtons("Option Button 57").Value = _
Not ActiveSheet.OptionButtons("Option Button 57").Value

The period means the part with the leading period is qualified by the object
in the With statement

Using With makes it simpler to write and in some cases could speed up
performance.

--
Regards,
Tom Ogilvy


"DennisB" wrote in message
...
I am relatively new to VBA but am learning fast. One thing that I can't
find the answer to is what is the significance of the (.) in front of a
code.

eg; With ActiveSheet.OptionButtons("Option Button 57")
.Value = Not .Value = xlOn
End With

I cn understand having it between the Not.Value but why is it in the

..Value
= etc.

Bewildered semi-Newbie

DennisB




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Dumb question of the day.

Hi Dennis,

My Apologies.

I missed the period between the parentheses and, therefore responded to an
imagined question rather than the one you posed.

---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Dennis,

eg; With ActiveSheet.OptionButtons("Option Button 57")


In the above line:

OptionButtons is the collection of option buttons
"Option Button 57" is a specific option button

and,therefo

ActiveSheet.OptionButtons("Option Button 57")

refers to a control named "Option Button 57", which is a member of the
OptionButtons collection on the active sheet,


---
Regards,
Norman



"DennisB" wrote in message
...
I am relatively new to VBA but am learning fast. One thing that I can't
find the answer to is what is the significance of the (.) in front of a
code.

eg; With ActiveSheet.OptionButtons("Option Button 57")
.Value = Not .Value = xlOn
End With

I cn understand having it between the Not.Value but why is it in the
.Value = etc.

Bewildered semi-Newbie

DennisB








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Dumb question of the day.

Je McGimpsey, Norman & Tom.

Thanks for the answer guys. You cleared up everything for me. Appreciate
the help very much

DennisB
"Tom Ogilvy" wrote in message
...
.Value within the With / End With statement is equivalent to


ActiveSheet.OptionButtons("Option Button 57").Value = _
Not ActiveSheet.OptionButtons("Option Button 57").Value

The period means the part with the leading period is qualified by the
object
in the With statement

Using With makes it simpler to write and in some cases could speed up
performance.

--
Regards,
Tom Ogilvy


"DennisB" wrote in message
...
I am relatively new to VBA but am learning fast. One thing that I can't
find the answer to is what is the significance of the (.) in front of a
code.

eg; With ActiveSheet.OptionButtons("Option Button 57")
.Value = Not .Value = xlOn
End With

I cn understand having it between the Not.Value but why is it in the

.Value
= etc.

Bewildered semi-Newbie

DennisB






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dumb Question David Excel Worksheet Functions 2 May 28th 07 08:13 PM
Dumb VBA question nobbyknownowt Excel Discussion (Misc queries) 0 April 23rd 06 08:12 AM
Dumb Dim Question Michael Smith Excel Programming 1 June 25th 04 05:43 PM
dumb question john m Excel Programming 2 December 24th 03 04:13 PM
Really Dumb Question Novice[_8_] Excel Programming 4 December 19th 03 01:20 AM


All times are GMT +1. The time now is 05:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"