User form code to capture input data

jt1954

New Member
Joined
Aug 18, 2011
Messages
8
I am trying to design a spreadsheet to allow user input directly into Excel, but am a VBA newbie!

I have reached a point where I think (?!) I may need a user form (rather than a data validation list) to present a matrix of choices to the user.

The draft VBA user form shows the initial sales categories (sportswear, sports equip, etc) here

userform.png


As each button is pressed, the related subcategory choice would appear in the list box. The categories and subcategories are summarised here for simplicity
Excel Workbook
ATAU
494Sports clothing Nom Codes
495Clothing
496Rugby4000
497Cricket4001
498Football4002
499Other4003
500Sports equip Nom Codes
501Equip
502Rugby4100
503Cricket4101
504Football4102
505Other4103
506Schoolwear Nominals
507Schools4200
508Colleges4201
509Other4202
510Workwear Nominals
511Basics4300
512Dickies4301
513Mascot4302
514Helly Hanson4303
515Snickers4304
516Caterpillar4305
517Other4306
518Other Nominals
519Internet4400
520Counter4500
521Other4900
Input
Excel 2007

What I need returned in each cell of col S (Nominal Code) below is the nominal code (4000, etc) relating to the user's selection of category/sub category from the input form. The form should "pop up" on each selection of a cell in col G (Sales category) then "hide" when the cursor moves off col G. A view of the input section of the worksheet is given here
Excel Workbook
GHIJKLMNOPQRS
1SALES CATEGORYQTYUNIT COSTUNIT SALEUNIT PROFITUNIT GP%QUOTE VALUEQUOTE PROFITQUOTE GP%TAX CODEPROD CATDEPT ANALNOMINAL CODE
2125.508.462.9635.00%101.5435.5435.00%T011
3155.608.623.0235.00%129.2345.2335.00%T011
4365.708.773.0735.00%315.69110.4935.00%T011
5205.758.853.1035.00%176.9261.9235.00%T011
6155.758.853.1035.00%132.6946.4435.00%T111
7605.808.923.1235.00%535.38187.3835.00%T111
8805.808.923.1235.00%713.85249.8535.00%T111
9755.859.003.1535.00%675.00236.2535.00%T111
10256.009.233.2335.00%230.7780.7735.00%T111
11126.259.623.3735.00%115.3840.3835.00%T111
12127.0010.773.7735.00%129.2345.2335.00%T111
13
14
Input
Excel 2007

I hope I've used this forum correctly and used the HTLM editor as intended - apologies if I haven't! Any help gratefully appreciated. (Win 7 Home Prem & Excel 2007)
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,224,568
Messages
6,179,595
Members
452,927
Latest member
whitfieldcraig

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top