Shown Drop-down list if login user=C

A

Albert Sim

I have a problem here which I have not been able to solve, hope someone out there have a solution.

I have created a Shared worksheet for several people, when user A & B login, they see "999" in cell B1. However, if user C login, cell B1 become a drop-down list (something like Data > Validation function). Is this possible?

Thank you.
 
D

Debra Dalgleish

Perhaps users A and B have Excel 97, and User C has a newer version of
Excel.

If Row 1 is frozen (Window>Freeze Panes), a data validation list
dropdown won't appear in Excel 97. This was fixed in later versions.
 
A

Albert Sim

No. All user are using Excel 2000. Anyway, what I mean on my question is I wanted user A & B to see "999" in cell B1 when they login. However, when user C login in, I want it to change to a drop-down list

----- Debra Dalgleish wrote: ----

Perhaps users A and B have Excel 97, and User C has a newer version of
Excel

If Row 1 is frozen (Window>Freeze Panes), a data validation list
dropdown won't appear in Excel 97. This was fixed in later versions

Albert Sim wrote
 
D

Dave Peterson

Can you rely on the username that they entered on the tools|options|general tab?

if yes, you could use an auto_open sub to do the work:

Option Explicit
Sub auto_open()

With Worksheets("sheet1").Range("b1")
Select Case LCase(Application.UserName)
Case Is = LCase("usernamea"), LCase("usernameb")
.Validation.Delete
.Value = 9999
Case Is = LCase("usernamec")
.ClearContents
With .Validation
.Delete
.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="a,b,c"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Case Else
MsgBox "I don't know what to do here!"
End Select

End With
End Sub

I wasn't sure what goes into the data|validation dropdown. You can record a
macro when you do it the way you like and just plop your code in there.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Top