New to Userforms - need return value in a cell

B

Brad E.

I have never programmed for a userform before, so I may need precise help here.
On a worksheet tab called 'Tables', I have a list of ZIP Codes with City and
County. The single column of ZIP Codes is a named range (ZIPS).
Some of the ZIP Codes are in the table two times, for instance,
90028.1 / Hollywood N of Sunset / Los Angeles (County)
90028.2 / Hollywood S of Sunset / Los Angeles
90038.1 / Hollywood N of Santa Monica / Los Angeles
90038.2 / Hollywood S of Santa Monica / Los Angeles
What I am looking for is when a user enters the ZIP Code of 90028, I would
like the userform to come up with 2 buttons on it with the 'City'
description. After selecting one of the buttons, I would like the
user-entered 90028 to change to 90028.1 or .2.

Row 86 = user-entered ZIP Code - I have Data Validation to only allow ZIPs
which are allowed, and because of this, I have also entered 90028 and 90038
into the ZIP Code list. For City and County, I have entered "*".
Row 87 = VLOOKUP City; 88 = County
I already have a Worksheet_Change event, with a Select Target.Row
Case 86
If Target.Offset(1,0).Value = "*" then
'I am not positive how to call the userform.
End If
I also have the 'SplitZIP' userform created, but I need help changing the
Caption depending on which ZIP Code is selected. Lastly, if the cmdSplit1
(cmdSplit2) button is selected on 'SplitZIP', I need to add 0.1 (0.2) to the
user-entered ZIP Code.
 
A

Andrew

1) Make the Buttons on the Userform
2) Double Click the Button .. (should Take you to the Click event
code)
3) in onClick Event for each Button ..

Cells(row,Column).Value=90028.1
or

Cells(row,Column).Value=90028.2


Hope that Helps
Andrew ;-)

|I have never programmed for a userform before, so I may need precise
help here.
| On a worksheet tab called 'Tables', I have a list of ZIP Codes with
City and
| County. The single column of ZIP Codes is a named range (ZIPS).
| Some of the ZIP Codes are in the table two times, for instance,
| 90028.1 / Hollywood N of Sunset / Los Angeles (County)
| 90028.2 / Hollywood S of Sunset / Los Angeles
| 90038.1 / Hollywood N of Santa Monica / Los Angeles
| 90038.2 / Hollywood S of Santa Monica / Los Angeles
| What I am looking for is when a user enters the ZIP Code of 90028, I
would
| like the userform to come up with 2 buttons on it with the 'City'
| description. After selecting one of the buttons, I would like the
| user-entered 90028 to change to 90028.1 or .2.
|
| Row 86 = user-entered ZIP Code - I have Data Validation to only
allow ZIPs
| which are allowed, and because of this, I have also entered 90028
and 90038
| into the ZIP Code list. For City and County, I have entered "*".
| Row 87 = VLOOKUP City; 88 = County
| I already have a Worksheet_Change event, with a Select Target.Row
| Case 86
| If Target.Offset(1,0).Value = "*" then
| 'I am not positive how to call the userform.
| End If
| I also have the 'SplitZIP' userform created, but I need help
changing the
| Caption depending on which ZIP Code is selected. Lastly, if the
cmdSplit1
| (cmdSplit2) button is selected on 'SplitZIP', I need to add 0.1
(0.2) to the
| user-entered ZIP Code.
| --
| Sorry it's so long and TIA, Brad E.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top