Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default New to Userforms - need return value in a cell

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 ;-)

"Brad E." wrote in message
...
|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.


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
Can userforms be embedded in a spreadsheet cell? tbd Excel Programming 4 October 15th 09 10:03 PM
UserForms - how to return a value? Marcus Schöneborn Excel Programming 10 September 27th 07 10:19 AM
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Excel Discussion (Misc queries) 2 March 15th 07 01:02 AM
Return values from UserForms Graham Y Excel Programming 2 November 19th 06 06:49 PM
cell ranges to userforms triaz Excel Programming 1 September 12th 05 05:18 PM


All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"