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

Hello!

I have a button that i want to be hidden unless a certain cell has a
certain value.

Any ideas?

Thanks

Steve


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080114-1, 14/01/2008
Tested on: 14/01/2008 16:05:29
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hidding buttons

Maybe you could use a worksheet_change event or worksheet_Calculate.

It would depend on how that cell changes (by formula or by typing) and what kind
of button it is. (Is it an optionbutton from the Forms toolbar or an
optionbutton from the control toolbox toolbar--or is it a button from the Forms
toolbar or a commandbutton from the control toolbox toolbar?)


Steve wrote:

Hello!

I have a button that i want to be hidden unless a certain cell has a
certain value.

Any ideas?

Thanks

Steve

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080114-1, 14/01/2008
Tested on: 14/01/2008 16:05:29
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hidding buttons

Dave Peterson wrote in
:

Maybe you could use a worksheet_change event or worksheet_Calculate.

It would depend on how that cell changes (by formula or by typing) and
what kind of button it is. (Is it an optionbutton from the Forms
toolbar or an optionbutton from the control toolbox toolbar--or is it
a button from the Forms toolbar or a commandbutton from the control
toolbox toolbar?)


Steve wrote:

Hello!

I have a button that i want to be hidden unless a certain cell has a
certain value.

Any ideas?

Thanks

Steve

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080114-1, 14/01/2008
Tested on: 14/01/2008 16:05:29
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com



Hi, Yes its a commandbutton from the control toolbox tollbar. Also I
would like to know both (Formula and by typing) As I will be using both
at some point.

Thanks


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080114-2, 14/01/2008
Tested on: 14/01/2008 16:42:13
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hidding buttons

Option Explicit
'based on a formula in B1
Private Sub Worksheet_Calculate()
Me.CommandButton1.Visible _
= Not (CBool(LCase(Me.Range("b1")) = LCase("hide")))
End Sub

'based on typing in A1
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("a1")) Is Nothing Then Exit Sub

Me.CommandButton1.Visible _
= Not (CBool(LCase(Target.Value) = LCase("hide")))
End Sub


Steve wrote:

Dave Peterson wrote in
:

Maybe you could use a worksheet_change event or worksheet_Calculate.

It would depend on how that cell changes (by formula or by typing) and
what kind of button it is. (Is it an optionbutton from the Forms
toolbar or an optionbutton from the control toolbox toolbar--or is it
a button from the Forms toolbar or a commandbutton from the control
toolbox toolbar?)


Steve wrote:

Hello!

I have a button that i want to be hidden unless a certain cell has a
certain value.

Any ideas?

Thanks

Steve

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080114-1, 14/01/2008
Tested on: 14/01/2008 16:05:29
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com



Hi, Yes its a commandbutton from the control toolbox tollbar. Also I
would like to know both (Formula and by typing) As I will be using both
at some point.

Thanks

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080114-2, 14/01/2008
Tested on: 14/01/2008 16:42:13
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.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
Hidding #DIV/0! In Cell Harlan Grove[_2_] Excel Worksheet Functions 0 May 23rd 07 07:41 PM
Hidding #DIV/0! In Cell Harlan Grove[_2_] Excel Worksheet Functions 0 May 23rd 07 07:37 PM
Hidding #DIV/0! In Cell Susan Excel Worksheet Functions 0 May 23rd 07 07:15 PM
Hidding #DIV/0! In Cell Harlan Grove[_2_] Excel Worksheet Functions 0 May 23rd 07 06:49 PM
Hidding #DIV/0! In Cell Harlan Grove[_2_] Excel Worksheet Functions 0 May 23rd 07 06:49 PM


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