Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Hide command button on worksheet

Can some please tell me how can I hide a command button
from users which depend on who open the workbook ?

My idea is:
select case Application.UserName
' List of regular user
Case "Moham"
Case "John"
Hide_Cmd_Btn=True
' List of special users
Case "Jad"
Case "Theresa"
Hide_Cmd_Btn=False
end Case
If Hide_Cmd_Btn
VBA code to hide the command btn.
End If
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Hide command button on worksheet

There doesn't seem to be a Visible property for command buttons. You can, however, disable it
via the Enabled property.

On Mon, 14 Jul 2003 14:29:52 -0700, "Mohair" wrote:

Can some please tell me how can I hide a command button
from users which depend on who open the workbook ?

My idea is:
select case Application.UserName
' List of regular user
Case "Moham"
Case "John"
Hide_Cmd_Btn=True
' List of special users
Case "Jad"
Case "Theresa"
Hide_Cmd_Btn=False
end Case
If Hide_Cmd_Btn
VBA code to hide the command btn.
End If


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Hide command button on worksheet

Select Case Application.UserName
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Hide command button on worksheet

If you're command button is on a worksheet, you can use
set the visible property of the button to true/false to
show or hide the button.

With Sheets("SheetNameHere")
.CommandButton1.Visible = False
.CommandButton2.Visible = True
End With

Rohit
-----Original Message-----
Can some please tell me how can I hide a command button
from users which depend on who open the workbook ?

My idea is:
select case Application.UserName
' List of regular user
Case "Moham"
Case "John"
Hide_Cmd_Btn=True
' List of special users
Case "Jad"
Case "Theresa"
Hide_Cmd_Btn=False
end Case
If Hide_Cmd_Btn
VBA code to hide the command btn.
End If
.

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
Command Button to show/hide a different worksheet Marilyn Excel Discussion (Misc queries) 1 April 22nd 09 03:37 AM
Use of Forms Command-button on Worksheet Jim May Excel Discussion (Misc queries) 12 November 13th 06 06:08 PM
Worksheet Command Button will not work willpwr Excel Worksheet Functions 0 May 16th 06 08:13 PM
Command Button to Hide/Unhide Rows Bea Excel Discussion (Misc queries) 4 March 16th 06 03:21 PM
How do I add a command button on a worksheet to "paste" from the . [email protected] Excel Worksheet Functions 3 March 13th 05 06:25 PM


All times are GMT +1. The time now is 03:01 AM.

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"