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

I have a sheet with 2 commandbuttons on it.
I want button1 to be visible if the total just above it is over 2500. Should
the total be below that level, I would like button 1 to be invisible and
button 2 to be visible
Can it be done,
How?
Thanks


--
Norton Professional 2004 says this email is clean...believe it


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Commandbuttons

PCOR wrote:
I have a sheet with 2 commandbuttons on it.
I want button1 to be visible if the total just above it is over 2500. Should
the total be below that level, I would like button 1 to be invisible and
button 2 to be visible
Can it be done,
How?


insert the following procedure into the code module of the sheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) < "F10" Then Exit Sub
CommandButton1.Visible = Target.Value 2500
CommandButton2.Visible = Target.Value <= 2500
End Sub

--
Regards
Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

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
Can I print different areas of a spreadsheet using CommandButtons Guy B Machan Excel Discussion (Misc queries) 1 April 16th 08 01:50 AM
Make CommandButtons Not Visable With A Macro Minitman Excel Worksheet Functions 7 April 1st 08 05:55 AM
delete commandbuttons on copied sheet qerj Excel Programming 6 February 16th 04 01:18 PM
Do While, OnTime and CommandButtons John Petty Excel Programming 1 November 23rd 03 12:23 AM
commandbuttons properties Rui[_2_] Excel Programming 2 November 5th 03 04:07 PM


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