Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Is it possible to hide and show buttons?

I have four buttons on my spreadsheet. (Top of Page, Update, Undo Update,
Redo Update). I was wondering if there was a way to hide the Undo Update
when the spread sheet is opened until the update button is pressed. And hide
the Redo Button untill the Undo button is pressed.)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Is it possible to hide and show buttons?

The buttons have a visible property. You would need to run code to set that
property to false. So, the the update click event would contain code to make
the Undo Update visible as an example.

The worksheet/workbook have other events that could come into play.
--
Regards,
Tom Ogilvy



"Kiba" wrote:

I have four buttons on my spreadsheet. (Top of Page, Update, Undo Update,
Redo Update). I was wondering if there was a way to hide the Undo Update
when the spread sheet is opened until the update button is pressed. And hide
the Redo Button untill the Undo button is pressed.)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Is it possible to hide and show buttons?

I can't find a visible property How would I go about finding it and changing
it with a code?

"Tom Ogilvy" wrote:

The buttons have a visible property. You would need to run code to set that
property to false. So, the the update click event would contain code to make
the Undo Update visible as an example.

The worksheet/workbook have other events that could come into play.
--
Regards,
Tom Ogilvy



"Kiba" wrote:

I have four buttons on my spreadsheet. (Top of Page, Update, Undo Update,
Redo Update). I was wondering if there was a way to hide the Undo Update
when the spread sheet is opened until the update button is pressed. And hide
the Redo Button untill the Undo button is pressed.)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Is it possible to hide and show buttons?

You can't find it because it is inherited from the container - the Ole Object
(assuming these are on a worksheet).

so from the immediate window as a demo:

? Activesheet.Commandbutton1.Visible
True
activesheet.Commandbutton1.Visible = False

? Activesheet.Commandbutton1.Visible
False

Or you can do

Activesheet.OleObjects("Commandbutton1").Visible = False

Again, from the immediate window as a demo:
Activesheet.OleObjects("Commandbutton1").Visible = True
? Activesheet.Commandbutton1.Visible
True

--
Regards,
Tom Ogilvy


"Kiba" wrote:

I can't find a visible property How would I go about finding it and changing
it with a code?

"Tom Ogilvy" wrote:

The buttons have a visible property. You would need to run code to set that
property to false. So, the the update click event would contain code to make
the Undo Update visible as an example.

The worksheet/workbook have other events that could come into play.
--
Regards,
Tom Ogilvy



"Kiba" wrote:

I have four buttons on my spreadsheet. (Top of Page, Update, Undo Update,
Redo Update). I was wondering if there was a way to hide the Undo Update
when the spread sheet is opened until the update button is pressed. And hide
the Redo Button untill the Undo button is pressed.)

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Is it possible to hide and show buttons?

Neither way seems to be working I just get the debug message. Do I need to
change the Commandbutton1 to something else?

"Tom Ogilvy" wrote:

You can't find it because it is inherited from the container - the Ole Object
(assuming these are on a worksheet).

so from the immediate window as a demo:

? Activesheet.Commandbutton1.Visible
True
activesheet.Commandbutton1.Visible = False

? Activesheet.Commandbutton1.Visible
False

Or you can do

Activesheet.OleObjects("Commandbutton1").Visible = False

Again, from the immediate window as a demo:
Activesheet.OleObjects("Commandbutton1").Visible = True
? Activesheet.Commandbutton1.Visible
True

--
Regards,
Tom Ogilvy


"Kiba" wrote:

I can't find a visible property How would I go about finding it and changing
it with a code?

"Tom Ogilvy" wrote:

The buttons have a visible property. You would need to run code to set that
property to false. So, the the update click event would contain code to make
the Undo Update visible as an example.

The worksheet/workbook have other events that could come into play.
--
Regards,
Tom Ogilvy



"Kiba" wrote:

I have four buttons on my spreadsheet. (Top of Page, Update, Undo Update,
Redo Update). I was wondering if there was a way to hide the Undo Update
when the spread sheet is opened until the update button is pressed. And hide
the Redo Button untill the Undo button is pressed.)



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Is it possible to hide and show buttons?

Commandbutton1 was the name of my button and was used as an example.

You would use the names of your buttons.

--
Regards,
Tom Ogilvy


"Kiba" wrote:

Neither way seems to be working I just get the debug message. Do I need to
change the Commandbutton1 to something else?

"Tom Ogilvy" wrote:

You can't find it because it is inherited from the container - the Ole Object
(assuming these are on a worksheet).

so from the immediate window as a demo:

? Activesheet.Commandbutton1.Visible
True
activesheet.Commandbutton1.Visible = False

? Activesheet.Commandbutton1.Visible
False

Or you can do

Activesheet.OleObjects("Commandbutton1").Visible = False

Again, from the immediate window as a demo:
Activesheet.OleObjects("Commandbutton1").Visible = True
? Activesheet.Commandbutton1.Visible
True

--
Regards,
Tom Ogilvy


"Kiba" wrote:

I can't find a visible property How would I go about finding it and changing
it with a code?

"Tom Ogilvy" wrote:

The buttons have a visible property. You would need to run code to set that
property to false. So, the the update click event would contain code to make
the Undo Update visible as an example.

The worksheet/workbook have other events that could come into play.
--
Regards,
Tom Ogilvy



"Kiba" wrote:

I have four buttons on my spreadsheet. (Top of Page, Update, Undo Update,
Redo Update). I was wondering if there was a way to hide the Undo Update
when the spread sheet is opened until the update button is pressed. And hide
the Redo Button untill the Undo button is pressed.)

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
Hide buttons Gisela Excel Discussion (Misc queries) 1 September 2nd 09 08:02 PM
Hide option buttons Wanna Learn Excel Discussion (Misc queries) 2 March 6th 08 02:48 PM
Hide Show Command Buttons Troubled User Excel Programming 1 May 2nd 07 05:41 PM
pivot chart is it possible to hide individual field buttons? Layout Field buttons Matt Charts and Charting in Excel 0 August 27th 06 02:57 PM
How do I hide tab scrolling buttons? dlove10486_1999 Excel Discussion (Misc queries) 1 January 5th 05 04:43 PM


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