Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default hello, very new to VBA, (?) silly question coming.....

Hi there, and thanks for reading this!

I am new to VBA and have an excel spreadsheet with a form in it that I would
like to use with a drop-down list to enable people to login to the
spreadsheet.

I have managed to make the form appear when the workbook is loaded (I told
you I'm very new to VBA!) and now have a form that shows a drop-down box and
a text entry field.

I would like to be able to use the drop-down box to lookup a list from a
spreadsheet (preferably an external sheet but it can be internal to the
worksheet if this is not possible) to select a list of user names...

This is my first hurdle... After that I am hoping that the user will enter a
password that will also use some sort of lookup function to the same
worksheet to deternine whether the password is correct or not, I am looking
to loop this for a number of attempts (3 for example) so that if they do not
enter the correct password they cannot enter the worksheet.

The overall hope is that once they have entered their username and password
they will be able to access different levels of the worksheet, so if they
only have 'Low' user accesibility then they will only see certain sheets, if
they have admin rights then they will see the whole sheet etc...

I hope you see where I am heading, for the moment tho I would be grateful
for any advice including how to lookup a list of names in a worksheet to
populate my drop-down box!

Thanks again for reading this, its my first post!

Rachie :D

p.s I am using Excel 2003!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default hello, very new to VBA, (?) silly question coming.....

Rachie

Start with something like this:

For Each c In Worksheets("Vendors").Range("A:A")
If c.Value < "" Then InfoCard.VendorCombo.AddItem c.Value
Next

InfoCard is the name of the form
VendorCombo is the name of the ComboBox

.... so this snippet loads up a ComboBox with all the vales in a range
in Column A

You COULD change the .Range("A:A") to .Range("UserNames") and define
your list of users in a range called UserNames

Hope this gets you started.

Greg


Rachie wrote:
Hi there, and thanks for reading this!

I am new to VBA and have an excel spreadsheet with a form in it that I would
like to use with a drop-down list to enable people to login to the
spreadsheet.

I have managed to make the form appear when the workbook is loaded (I told
you I'm very new to VBA!) and now have a form that shows a drop-down box and
a text entry field.

I would like to be able to use the drop-down box to lookup a list from a
spreadsheet (preferably an external sheet but it can be internal to the
worksheet if this is not possible) to select a list of user names...

This is my first hurdle... After that I am hoping that the user will enter a
password that will also use some sort of lookup function to the same
worksheet to deternine whether the password is correct or not, I am looking
to loop this for a number of attempts (3 for example) so that if they do not
enter the correct password they cannot enter the worksheet.

The overall hope is that once they have entered their username and password
they will be able to access different levels of the worksheet, so if they
only have 'Low' user accesibility then they will only see certain sheets, if
they have admin rights then they will see the whole sheet etc...

I hope you see where I am heading, for the moment tho I would be grateful
for any advice including how to lookup a list of names in a worksheet to
populate my drop-down box!

Thanks again for reading this, its my first post!

Rachie :D

p.s I am using Excel 2003!


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
Silly question Darrell_Sarrasin via OfficeKB.com Excel Worksheet Functions 6 May 11th 07 01:08 PM
What a silly question ! tom Excel Programming 7 August 22nd 06 11:12 AM
Silly question ksnapp[_41_] Excel Programming 3 April 6th 04 07:59 AM
Silly Question Mick Southam Excel Programming 4 January 6th 04 09:32 PM
Simply silly question paul Excel Programming 7 August 5th 03 11:38 PM


All times are GMT +1. The time now is 02:09 PM.

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"