Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Hiding A Sheet Command Button With VBA

Greetings,

I have a Command Button on a worksheet than under some conditions
needs to be hidden. I am trying to hide it from a UserForm. I have
tried:

CommandButton1.Visible = False

In the code to start the next procedure, I get this message in a
"Microsoft Visual Basic" message box:

Compile Error:
Variable not defined

Any suggestions?

TIA

-Minitman


  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27,285
Default Hiding A Sheet Command Button With VBA

Worksheets("sheet1").CommandButton1.Visible = False

--
Regards,
Tom Ogilvy

"Minitman" wrote in message
...
Greetings,

I have a Command Button on a worksheet than under some conditions
needs to be hidden. I am trying to hide it from a UserForm. I have
tried:

CommandButton1.Visible = False

In the code to start the next procedure, I get this message in a
"Microsoft Visual Basic" message box:

Compile Error:
Variable not defined

Any suggestions?

TIA

-Minitman




  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Hiding A Sheet Command Button With VBA

Thanks Tom,

That is just what I was looking for.

On Sat, 6 Mar 2004 19:35:03 -0500, "Tom Ogilvy"
wrote:

Worksheets("sheet1").CommandButton1.Visible = False


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
Use macro(command button) paste special in 2nd sheet deen Excel Worksheet Functions 5 February 25th 08 01:04 PM
Command Button Moves when sheet printed DarbyDog Excel Discussion (Misc queries) 2 September 22nd 05 03:24 PM
How do I create a command button to jump from sheet to sheet in a. Darlenew Excel Worksheet Functions 3 March 22nd 05 10:36 PM
Command Button not working once sheet is protected Janice[_3_] Excel Programming 5 November 17th 03 10:22 PM
generating sheet with command button & code Bob[_27_] Excel Programming 4 August 4th 03 02:46 PM


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