Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default EXCEL Checkboxxx Props.

I was hoping to create a spreadsheet in which i could have a workboo
appear/dissapear based on the status (checked/uncheckd) of a checkbox
have planted in the main workbook. I am familiar with VB, but not wit
excel macros and would very much appreciate the help. This is what
was thinking..

Sub CheckBox1_Click()
If Sheet1.Index(A1:J40, 2, 4) = "TRUE" Then
Sheet2.Visible = xlSheetVisible
Else
End If
If Sheet1.Index(A1:J40, 2, 4) = "FALSE" Then
Sheet2.Visible = xlSheetHidden
End If
End Sub

The cell referenced in the previous code (2, 4) is the cell that I hav
associated with the checkox. It's text is either TRUE or FALSE dependin
on the state of the box. I might be totally on the wrong track wit
this..

Please help. Thanks!

D

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default EXCEL Checkboxxx Props.

Maybe you could just use if the checkbox is checked or not:

Option Explicit
Private Sub CheckBox1_Click()
Sheet2.Visible = Not (Me.CheckBox1.Value)
End Sub

Or something like this:
Option Explicit
Private Sub CheckBox1_Click()
Sheet2.Visible = Not (Range(Me.CheckBox1.LinkedCell).Value)
End Sub

Or if you know the cell's location on the same sheet.

Option Explicit
Private Sub CheckBox1_Click()
Sheet2.Visible = Not (me.cells(2,4).Value)
End Sub

I like the first.


"djayc53 <" wrote:

I was hoping to create a spreadsheet in which i could have a workbook
appear/dissapear based on the status (checked/uncheckd) of a checkbox i
have planted in the main workbook. I am familiar with VB, but not with
excel macros and would very much appreciate the help. This is what I
was thinking..

Sub CheckBox1_Click()
If Sheet1.Index(A1:J40, 2, 4) = "TRUE" Then
Sheet2.Visible = xlSheetVisible
Else
End If
If Sheet1.Index(A1:J40, 2, 4) = "FALSE" Then
Sheet2.Visible = xlSheetHidden
End If
End Sub

The cell referenced in the previous code (2, 4) is the cell that I have
associated with the checkox. It's text is either TRUE or FALSE depending
on the state of the box. I might be totally on the wrong track with
this..

Please help. Thanks!

DC

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

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
data range props Steve M Excel Discussion (Misc queries) 0 April 11th 05 10:32 AM
TextBox props Garry Jones Excel Programming 5 October 7th 03 08:36 AM


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