Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default VBA for form check boxes

Trying to assign a macro to a check box that will hide and unhide rows
depending on whether its checked or not. I can do it using a control
check box, but not a form check box. Any ideas?

Here is the code that works for the control check box:

Private Sub CheckBox1_Change()
If CheckBox1.Value = False Then
Issue_Mgt_Hide ( 'I assigned it to a different macro called
Issue_mgt_hide)
Else
Issue_Mgt_Unhide
End If
End Sub

Thanks for any help!

Ryan
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9,101
Default VBA for form check boxes

I don't think this is the problem. You can try putting a break point in this
code and you will probably get to the break point. The problem is in the
Issue_Mgt_Hide. You are not referencing the worksheet probably. The focus
is on the userform when you activate the check box moving the forcus away
from the active worksheet. Don't use active worksheet.

"dicko1" wrote:

Trying to assign a macro to a check box that will hide and unhide rows
depending on whether its checked or not. I can do it using a control
check box, but not a form check box. Any ideas?

Here is the code that works for the control check box:

Private Sub CheckBox1_Change()
If CheckBox1.Value = False Then
Issue_Mgt_Hide ( 'I assigned it to a different macro called
Issue_mgt_hide)
Else
Issue_Mgt_Unhide
End If
End Sub

Thanks for any help!

Ryan

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default VBA for form check boxes

hi
you can do it with a forms check box IF the check box is on a form. if not
and the check box is on the sheet then use the control check box.

Regards
FSt1

"dicko1" wrote:

Trying to assign a macro to a check box that will hide and unhide rows
depending on whether its checked or not. I can do it using a control
check box, but not a form check box. Any ideas?

Here is the code that works for the control check box:

Private Sub CheckBox1_Change()
If CheckBox1.Value = False Then
Issue_Mgt_Hide ( 'I assigned it to a different macro called
Issue_mgt_hide)
Else
Issue_Mgt_Unhide
End If
End Sub

Thanks for any help!

Ryan

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default VBA for form check boxes

Hi,

When you say "form check box" do you mean a checkbox on a UserForm in the
VBE or do you mean you have created a sheet which you are using as a form?

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"dicko1" wrote:

Trying to assign a macro to a check box that will hide and unhide rows
depending on whether its checked or not. I can do it using a control
check box, but not a form check box. Any ideas?

Here is the code that works for the control check box:

Private Sub CheckBox1_Change()
If CheckBox1.Value = False Then
Issue_Mgt_Hide ( 'I assigned it to a different macro called
Issue_mgt_hide)
Else
Issue_Mgt_Unhide
End If
End Sub

Thanks for any help!

Ryan

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default VBA for form check boxes

On Jun 4, 4:33*pm, FSt1 wrote:
hi
you can do it with a forms check box IF the check box is on a form. if not
and the check box is on the sheet then use the control check box.

Regards
FSt1



"dicko1" wrote:
Trying to assign a macro to a check box that will hide and unhide rows
depending on whether its checked or not. I can do it using a control
check box, but not a form check box. Any ideas?


Here is the code that works for the control check box:


Private Sub CheckBox1_Change()
* *If CheckBox1.Value = False Then
* * * Issue_Mgt_Hide ( 'I assigned it to a different macro called
Issue_mgt_hide)
* *Else
* * * Issue_Mgt_Unhide
* *End If
End Sub


Thanks for any help!


Ryan- Hide quoted text -


- Show quoted text -


When I say a form check box, I mean one created from the Form's
Toolbar, not the Control Toolbox. This is created on a sheet.

I'm thinking something like this.....

Sub CheckBox()


If Sheet1.CheckBoxes("Check Box 1").Value = 1 Then
Issue_Mgt_Hide
Else
Issue_Mgt_Unhide
End If


End Sub

Thanks,
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
copy check boxes (made from form toolbar) hoffjero Excel Discussion (Misc queries) 6 February 4th 09 11:20 PM
VBA code for the Check Boxes in a form HKS Excel Discussion (Misc queries) 3 June 24th 08 09:42 PM
Add tab access to check boxes in a protected Excel sheet form. Suebriquet Excel Discussion (Misc queries) 0 July 25th 07 07:12 PM
How do I create a Form with check boxes in Excel Not Super User Excel Worksheet Functions 1 June 28th 07 05:08 PM
How do I remove (form) check-boxes from multiple excel fields? ATSANAC Excel Discussion (Misc queries) 2 May 11th 06 06:48 PM


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