PC Review


Reply
Thread Tools Rate Thread

Check Box Status

 
 
=?Utf-8?B?TGVl?=
Guest
Posts: n/a
 
      18th Apr 2007
I have a form which opens in Excel that allows users to display/hide tabs.
There’s 60+ tabs so the form allows them to see only the ones they want. The
form contains a series of check boxes that they check, then click on a
display/hide button, and hide the tabs that are not checked. At the end the
form closes.

I would like to change the form so when it is opened, the default for the
check box is based on the status of the tab. If the tab is showing it’s
corresponding check box is checked, if the tab is hidden, the check box is
not checked.

This is a sample of the routine that displays/hides the tabs and works fine

Private Sub DispHide_Btn_Click()
If Tsk_ChkBox = True Then Sheet4.Visible = xlSheetVisible Else:
Sheet4.Visible = xlSheetHidden
If ResComb_Chkbox = True Then Sheet21.Visible = xlSheetVisible Else:
Sheet21.Visible = xlSheetHidden
End Sub

This is a sample of the code I have to open the form, but it doesn’t open
with the check boxes checked. The sheets are visible.

Private Sub OpenForm_Click()
DispHide_Frm.Show
If Sheet4.Visible = True Then Tsk_ChkBox = True
If Sheet21.Visible = True Then ResComb_Chkbox = True
End Sub

Any ideas on how to get the check boxes to open with a true status and
display checked?

Thanks for the help

--
Lee Kirts
 
Reply With Quote
 
 
 
 
David G
Guest
Posts: n/a
 
      20th Apr 2007
On Apr 18, 4:02 pm, Lee <L...@discussions.microsoft.com> wrote:
> This is a sample of the code I have to open the form, but it doesn't open
> with the check boxes checked. The sheets are visible.
>
> Private Sub OpenForm_Click()
> DispHide_Frm.Show
> If Sheet4.Visible = True Then Tsk_ChkBox = True
> If Sheet21.Visible = True Then ResComb_Chkbox = True
> End Sub


Hello Lee,

I'm not sure about this, but isn't it necessary to specify the
checkboxes as DispHide_Frm.Tsk_ChkBox and DispHide_Frm.ResComb_Chkbox
instead of just Tsk_ChkBox and ResComb_Chkbox?
Also, it may be helpful to run the debugger to see which step gives
you the unexpected result.

David

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check the status of the UDP port status tsgd84 Windows Networking 0 2nd Jul 2008 02:35 PM
c# app to check web status... trint Microsoft C# .NET 10 14th Feb 2007 03:03 PM
Check Box Status =?Utf-8?B?VG9t?= Microsoft Excel Programming 2 16th Feb 2005 11:17 PM
How to check the status of an UPS? =?Utf-8?B?V29vIE11biBGb29uZw==?= Microsoft VB .NET 2 5th Nov 2004 10:03 AM
How can I check the status of an email? Bruccce Microsoft Outlook VBA Programming 0 1st Aug 2003 10:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:45 PM.