View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Brad E. Brad E. is offline
external usenet poster
 
Posts: 76
Default New to Userforms - need return value in a cell

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.