LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default why does combobox lose choices

Working on an process where a user enters their id in a form to determine
what role they will have in the application (admin, engineer, manager, etc.),
if a single role is found for the user then it continues on with no selection
process, but if the user has multiple roles they can take I have the form
display a combobox for them to select their role for this process.

Problem the first choice always seems to disappear from the drop down list
if I run it from excel, if I step through the form in VB editor the list is
ok all choices appear.

The spread sheet always has all of the role entries, the range name list
always includes all entries, but when the form is called from excel using

Load UserEntry
UserEntry.Show

what ever the first choice is in the list disappears from the list

My code once the userid has been entered is as follows

Beginning:
If UserName.Value = "" Then
ErrorOk "User Name must be entered to continue"
Exit Sub
Else
'
' Verify that the user exists in the database
WUserId = UserName.Value
Found = False
dbName = "MLMBudget.mdb"
tbName = "Personnel"
WSql = "Select UserId From Personnel Where UserId=""" + WUserId + """"
VerifyEntry
'
' If user id not found have them enter their profile and select roles
If Not Found Then
Load UserUpdate
UserUpdate.Show
End If
'
' If user id found or entered
' Select the data from the table and place on the sheet to create a
name list
tbName = "UserPriv"
WSql = "Select Role From UserPriv Where UserId=""" + WUserId + """"
QueryTable 2, 1
'
' Create the name list and display combobox for selection
If NRec 1 Then
Range("A2:" + ActiveCell.Offset(NRec - 1, 0).Address).Select
Selection.Name = "RoleList"
Role.Visible = True
Label2.Visible = True
Else
Range("A2").select
WRole = ActiveCell.Value
UserEntry.Hide
Unload UserEntry
End If
End If
End Sub



Is there a property flag or some setting that would cause this?

 
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
Choices Baffled[_2_] Excel Discussion (Misc queries) 1 September 29th 08 10:01 PM
Nested IF with = and <= choices Clark Excel Worksheet Functions 4 August 1st 08 06:45 PM
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
Choices [email protected] Excel Worksheet Functions 0 December 21st 04 12:07 AM
poping up a box with choices? neowok[_42_] Excel Programming 1 March 5th 04 11:06 PM


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