Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Set properties of a Check Box

I've used something like this to set the properties of a ToggleButton.

Me.ToggleButton5.Value = False

How can I do this same sort of thing with a Check Box, also created from the
Control Toolbox?

I've tried the similar syntax, but I get an error.

Me.CheckBoxName.Value = False 'Invalid use of Me keyword
ActiveSheet.Shapes("CheckBoxName").Value = False 'Object doesn't
support this property or method

What code is necessary to set the properties of a checkbox?

Thanks in advance,
Paul





--



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Set properties of a Check Box

You can't use Me in the Immediate Window if that is what you were doing.
This works fine in a code procedure though...

Me.CheckBox1.Value = True

In the Immediate Window, you can refer to the worksheet directly or via the
ActiveSheet object...

Worksheet("Sheet1").CheckBox1.Value = True

or

ActiveSheet.CheckBox1.Value = True

--
Rick (MVP - Excel)


"PCLIVE" wrote in message
...
I've used something like this to set the properties of a ToggleButton.

Me.ToggleButton5.Value = False

How can I do this same sort of thing with a Check Box, also created from
the Control Toolbox?

I've tried the similar syntax, but I get an error.

Me.CheckBoxName.Value = False 'Invalid use of Me keyword
ActiveSheet.Shapes("CheckBoxName").Value = False 'Object doesn't
support this property or method

What code is necessary to set the properties of a checkbox?

Thanks in advance,
Paul





--




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Set properties of a Check Box

Thanks Rick. I could have sworn that I tried that. I guess I didn't.

Thanks again.

--

"Rick Rothstein" wrote in message
...
You can't use Me in the Immediate Window if that is what you were doing.
This works fine in a code procedure though...

Me.CheckBox1.Value = True

In the Immediate Window, you can refer to the worksheet directly or via
the ActiveSheet object...

Worksheet("Sheet1").CheckBox1.Value = True

or

ActiveSheet.CheckBox1.Value = True

--
Rick (MVP - Excel)


"PCLIVE" wrote in message
...
I've used something like this to set the properties of a ToggleButton.

Me.ToggleButton5.Value = False

How can I do this same sort of thing with a Check Box, also created from
the Control Toolbox?

I've tried the similar syntax, but I get an error.

Me.CheckBoxName.Value = False 'Invalid use of Me keyword
ActiveSheet.Shapes("CheckBoxName").Value = False 'Object doesn't
support this property or method

What code is necessary to set the properties of a checkbox?

Thanks in advance,
Paul





--






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Set properties of a Check Box

Never mind. I think I got it.

ActiveSheet.OLEObjects("CheckBoxName").Object.Valu e = False



--

"PCLIVE" wrote in message
...
I've used something like this to set the properties of a ToggleButton.

Me.ToggleButton5.Value = False

How can I do this same sort of thing with a Check Box, also created from
the Control Toolbox?

I've tried the similar syntax, but I get an error.

Me.CheckBoxName.Value = False 'Invalid use of Me keyword
ActiveSheet.Shapes("CheckBoxName").Value = False 'Object doesn't
support this property or method

What code is necessary to set the properties of a checkbox?

Thanks in advance,
Paul





--





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
Loop through column(s) to check values, perform action based on check ward376 Excel Programming 4 November 6th 07 03:21 PM
Increase size of a Forms Check Box (click on to enter check mark) 718Satoshi Excel Discussion (Misc queries) 0 August 17th 07 01:52 AM
Properties transferring from excel cells to word file properties lubo Excel Programming 4 July 12th 05 11:24 AM
check properties of 400 Excel files Mark Excel Discussion (Misc queries) 2 June 8th 05 02:58 PM
Properties Page is blank for check box Control, other controls Lea Excel Programming 1 August 20th 03 11:57 PM


All times are GMT +1. The time now is 12:18 PM.

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

About Us

"It's about Microsoft Excel"