LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default User Form with dropdown item

I want to create a user form to to create a variable value to one of four
values using a dropdown list with the name Account_Number: "CC Account #"


The form name is Select_CC_Bank()
I don't want to pre-define these variavles as cells on the worksheet.
I want the Form to select a 4 digit integer numerical value, different for
each item, only one value will be chosen.

I have predefined the values:


Private Sub UserForm_Initialize()
' Add pre-defined choices

' Do I define Name.AT&T-Visa = "1234" "don't know if this is the correct
' format and the others before or after the form, or does it not matter?

Name.USAir-VISA = "3214" ' assuming this is the correct format
Name.AT&T-Visa = "1234" ' are the quotes needed for number value?
Name.Capitol1-VISA = "4123"
Name.CASH = "1324"

cb_CCBank.AddItem "USAir-VISA"
cb_CCBank.AddItem "AT&T-MC"
cb_CCBank.AddItem "Capitol1-VISA"
cb_CCBank.AddItem "CASH"
cb_CCBank.AddItem " "
End Sub

I want the Form to select the 4 digit integer numerical value, different for
and based on each item, only one value will be chosen by the form, then OK.
How do I know what was returned by the form?


Private Sub UserForm_SetVariable()
AcctNo = Returned_variable 'I think this puts the numerical 1234 in
' the variable AcctNo
EndSub



The rest of the usage of the value of the variable in the macro is pretty
simple and I think Ican handle it.
After OK, the rest of the macro will set the variable name, change the tab
name and select a region and insert that numerical value in every cell in
the region.

I'm working from Bill Jelen's book and Chapter 9 is not too clear in the
forms area, although the first 8 chapters are very useful

Gene

 
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
Make dropdown item list in invoice sheet tim New Users to Excel 2 March 7th 08 07:47 PM
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
Select an item from dropdown list but return value from adjacent c StevanT Excel Discussion (Misc queries) 4 March 17th 07 12:39 PM
How can I allow a user to select more than 1 drop down item? stlblackbeltsmom Excel Worksheet Functions 2 December 18th 06 05:30 PM
How can I set up to chose more than 1 item from a dropdown list (. microchick Excel Discussion (Misc queries) 4 April 7th 05 06:59 PM


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