ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pop-up Combo Box (https://www.excelbanter.com/excel-programming/294587-pop-up-combo-box.html)

Brad E

Pop-up Combo Box
 
There is a spreadsheet which four people will be using,
and I need to know which of the four will be using for
formatting. Upon opening the 'template' workbook, I would
like a pop-up drop-down list of the user's names, which
they will have to select before entering on the
spreadsheet.
I would like to know two things: 1)how do I make the Combo
Box pop-up, 2)how do I make this pop up when the workbook
is open?
Thanks, Brad E.

Bob Phillips[_6_]

Pop-up Combo Box
 
Brad,

don't bother. Use this function to get the user name

Public Declare Function GetUserName Lib "advapi32.dll" _
Alias "GetUserNameA" _
(ByVal lpBuffer As String, _
nSize As Long) As Long

Public Function UserName() As String
Dim sName As String * 256
Dim cChars As Long
cChars = 256
If GetUserName(sName, cChars) Then
UserName = Left$(sName, cChars - 1)
End If
End Function

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Brad E" wrote in message
...
There is a spreadsheet which four people will be using,
and I need to know which of the four will be using for
formatting. Upon opening the 'template' workbook, I would
like a pop-up drop-down list of the user's names, which
they will have to select before entering on the
spreadsheet.
I would like to know two things: 1)how do I make the Combo
Box pop-up, 2)how do I make this pop up when the workbook
is open?
Thanks, Brad E.




Frank Kabel

Pop-up Combo Box
 
Hi Brad
for the second question use either the workbook_open event (in your
workbook module) or name your macro Auto_Open()

--
Regards
Frank Kabel
Frankfurt, Germany


Brad E wrote:
There is a spreadsheet which four people will be using,
and I need to know which of the four will be using for
formatting. Upon opening the 'template' workbook, I would
like a pop-up drop-down list of the user's names, which
they will have to select before entering on the
spreadsheet.
I would like to know two things: 1)how do I make the Combo
Box pop-up, 2)how do I make this pop up when the workbook
is open?
Thanks, Brad E.



Bob Phillips[_6_]

Pop-up Combo Box
 
Frank,

If he takes my advice (and why wouldn't he<vbg?) the second question
becomes redundant.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Frank Kabel" wrote in message
...
Hi Brad
for the second question use either the workbook_open event (in your
workbook module) or name your macro Auto_Open()

--
Regards
Frank Kabel
Frankfurt, Germany


Brad E wrote:
There is a spreadsheet which four people will be using,
and I need to know which of the four will be using for
formatting. Upon opening the 'template' workbook, I would
like a pop-up drop-down list of the user's names, which
they will have to select before entering on the
spreadsheet.
I would like to know two things: 1)how do I make the Combo
Box pop-up, 2)how do I make this pop up when the workbook
is open?
Thanks, Brad E.





Frank Kabel

Pop-up Combo Box
 
Hi Bob
he should but I did not see your advice? (or was this a different post)

--
Regards
Frank Kabel
Frankfurt, Germany


Bob Phillips wrote:
Frank,

If he takes my advice (and why wouldn't he<vbg?) the second question
becomes redundant.


"Frank Kabel" wrote in message
...
Hi Brad
for the second question use either the workbook_open event (in your
workbook module) or name your macro Auto_Open()

--
Regards
Frank Kabel
Frankfurt, Germany


Brad E wrote:
There is a spreadsheet which four people will be using,
and I need to know which of the four will be using for
formatting. Upon opening the 'template' workbook, I would
like a pop-up drop-down list of the user's names, which
they will have to select before entering on the
spreadsheet.
I would like to know two things: 1)how do I make the Combo
Box pop-up, 2)how do I make this pop up when the workbook
is open?
Thanks, Brad E.



Bob Phillips[_6_]

Pop-up Combo Box
 
Frank,

That's odd isn't it. I see it okay, I wonder if the OP can. This is what I
put

Brad,

don't bother. Use this function to get the user name

Public Declare Function GetUserName Lib "advapi32.dll" _
Alias "GetUserNameA" _
(ByVal lpBuffer As String, _
nSize As Long) As Long

Public Function UserName() As String
Dim sName As String * 256
Dim cChars As Long
cChars = 256
If GetUserName(sName, cChars) Then
UserName = Left$(sName, cChars - 1)
End If
End Function


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Frank Kabel" wrote in message
...
Hi Bob
he should but I did not see your advice? (or was this a different post)

--
Regards
Frank Kabel
Frankfurt, Germany


Bob Phillips wrote:
Frank,

If he takes my advice (and why wouldn't he<vbg?) the second question
becomes redundant.


"Frank Kabel" wrote in message
...
Hi Brad
for the second question use either the workbook_open event (in your
workbook module) or name your macro Auto_Open()

--
Regards
Frank Kabel
Frankfurt, Germany


Brad E wrote:
There is a spreadsheet which four people will be using,
and I need to know which of the four will be using for
formatting. Upon opening the 'template' workbook, I would
like a pop-up drop-down list of the user's names, which
they will have to select before entering on the
spreadsheet.
I would like to know two things: 1)how do I make the Combo
Box pop-up, 2)how do I make this pop up when the workbook
is open?
Thanks, Brad E.






All times are GMT +1. The time now is 04:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com