Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Select Case Application.UserName
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Command Button to show/hide a different worksheet | Excel Discussion (Misc queries) | |||
Use of Forms Command-button on Worksheet | Excel Discussion (Misc queries) | |||
Worksheet Command Button will not work | Excel Worksheet Functions | |||
Command Button to Hide/Unhide Rows | Excel Discussion (Misc queries) | |||
How do I add a command button on a worksheet to "paste" from the . | Excel Worksheet Functions |