Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default =EMBED("Forms.CheckBox.1","")

Hi Everyone
I 've got a form with 107 CheckBoxes from the "Control Toolbar" and would
like to have a macro to go through the list and uncheck those that are
selected ( Check).
The Macro Recorder will not do it.
Any help would be appreciated.
Regards
John

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default =EMBED("Forms.CheckBox.1","")

On a worksheet, right?

Option Explicit
Sub testme01()

Dim OLEObj As OLEObject

For Each OLEObj In Worksheets("sheet999").OLEObjects
If TypeOf OLEObj.Object Is MSForms.CheckBox Then
OLEObj.Object.Value = False
End If
Next OLEObj

End Sub



John wrote:

Hi Everyone
I 've got a form with 107 CheckBoxes from the "Control Toolbar" and would
like to have a macro to go through the list and uncheck those that are
selected ( Check).
The Macro Recorder will not do it.
Any help would be appreciated.
Regards
John


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default =EMBED("Forms.CheckBox.1","")

Hi Dave
Thank you for your time to reply but I'm getting an error "Subscript out of
range" .
I also received a reply from Joel and is macro is working.
Thank you again
Best Wishes for the Holidays
John

"Dave Peterson" wrote in message
...
On a worksheet, right?

Option Explicit
Sub testme01()

Dim OLEObj As OLEObject

For Each OLEObj In Worksheets("sheet999").OLEObjects
If TypeOf OLEObj.Object Is MSForms.CheckBox Then
OLEObj.Object.Value = False
End If
Next OLEObj

End Sub



John wrote:

Hi Everyone
I 've got a form with 107 CheckBoxes from the "Control Toolbar" and would
like to have a macro to go through the list and uncheck those that are
selected ( Check).
The Macro Recorder will not do it.
Any help would be appreciated.
Regards
John


--

Dave Peterson


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default =EMBED("Forms.CheckBox.1","")

Did you change the sheet999 to the name of the sheet that had the checkboxes?

John wrote:

Hi Dave
Thank you for your time to reply but I'm getting an error "Subscript out of
range" .
I also received a reply from Joel and is macro is working.
Thank you again
Best Wishes for the Holidays
John

"Dave Peterson" wrote in message
...
On a worksheet, right?

Option Explicit
Sub testme01()

Dim OLEObj As OLEObject

For Each OLEObj In Worksheets("sheet999").OLEObjects
If TypeOf OLEObj.Object Is MSForms.CheckBox Then
OLEObj.Object.Value = False
End If
Next OLEObj

End Sub



John wrote:

Hi Everyone
I 've got a form with 107 CheckBoxes from the "Control Toolbar" and would
like to have a macro to go through the list and uncheck those that are
selected ( Check).
The Macro Recorder will not do it.
Any help would be appreciated.
Regards
John


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default =EMBED("Forms.CheckBox.1","")

Hi Dave
Now I did and it works fine. As you can see i'm no expert with macros
I will keep your macro for future use, I intend to build myself a library of
macros and possibly start learning them.
Thanks again
John
"Dave Peterson" wrote in message
...
Did you change the sheet999 to the name of the sheet that had the
checkboxes?

John wrote:

Hi Dave
Thank you for your time to reply but I'm getting an error "Subscript out
of
range" .
I also received a reply from Joel and is macro is working.
Thank you again
Best Wishes for the Holidays
John

"Dave Peterson" wrote in message
...
On a worksheet, right?

Option Explicit
Sub testme01()

Dim OLEObj As OLEObject

For Each OLEObj In Worksheets("sheet999").OLEObjects
If TypeOf OLEObj.Object Is MSForms.CheckBox Then
OLEObj.Object.Value = False
End If
Next OLEObj

End Sub



John wrote:

Hi Everyone
I 've got a form with 107 CheckBoxes from the "Control Toolbar" and
would
like to have a macro to go through the list and uncheck those that are
selected ( Check).
The Macro Recorder will not do it.
Any help would be appreciated.
Regards
John

--

Dave Peterson


--

Dave Peterson




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default =EMBED("Forms.CheckBox.1","")

I should have included a note telling you what to change.

But glad you have a solution or two.

John wrote:

Hi Dave
Now I did and it works fine. As you can see i'm no expert with macros
I will keep your macro for future use, I intend to build myself a library of
macros and possibly start learning them.
Thanks again
John
"Dave Peterson" wrote in message
...
Did you change the sheet999 to the name of the sheet that had the
checkboxes?

John wrote:

Hi Dave
Thank you for your time to reply but I'm getting an error "Subscript out
of
range" .
I also received a reply from Joel and is macro is working.
Thank you again
Best Wishes for the Holidays
John

"Dave Peterson" wrote in message
...
On a worksheet, right?

Option Explicit
Sub testme01()

Dim OLEObj As OLEObject

For Each OLEObj In Worksheets("sheet999").OLEObjects
If TypeOf OLEObj.Object Is MSForms.CheckBox Then
OLEObj.Object.Value = False
End If
Next OLEObj

End Sub



John wrote:

Hi Everyone
I 've got a form with 107 CheckBoxes from the "Control Toolbar" and
would
like to have a macro to go through the list and uncheck those that are
selected ( Check).
The Macro Recorder will not do it.
Any help would be appreciated.
Regards
John

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default =EMBED("Forms.CheckBox.1","")

Sub UnCheck()

For Each shp In ActiveSheet.OLEObjects
If shp.progID = "Forms.CheckBox.1" Then
shp.Object.Value = False
End If
Next shp
End Sub


"John" wrote:

Hi Everyone
I 've got a form with 107 CheckBoxes from the "Control Toolbar" and would
like to have a macro to go through the list and uncheck those that are
selected ( Check).
The Macro Recorder will not do it.
Any help would be appreciated.
Regards
John


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default =EMBED("Forms.CheckBox.1","")

Hi Joel
Its working fine.
Many thanks and all the best to You for the Holidays
Regards
John
"Joel" wrote in message
...
Sub UnCheck()

For Each shp In ActiveSheet.OLEObjects
If shp.progID = "Forms.CheckBox.1" Then
shp.Object.Value = False
End If
Next shp
End Sub


"John" wrote:

Hi Everyone
I 've got a form with 107 CheckBoxes from the "Control Toolbar" and would
like to have a macro to go through the list and uncheck those that are
selected ( Check).
The Macro Recorder will not do it.
Any help would be appreciated.
Regards
John



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
=EMBED("Forms.TextBox.1","") Lynda Excel Discussion (Misc queries) 1 September 28th 09 03:23 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
what does =EMBED("Forms.ComboBox.1","") mean? dan dungan Excel Programming 2 April 10th 08 10:47 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 07:05 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"