Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default List Box connect to a cell

Hello I'm a novice at this ... I created a userform - then I added the
button to the spreadsheet and it works. But how Do I add/connect the answer I
select to cell B7 of the spreadsheet . Example if someone selects Type A I
want type A to show in cell B7 , if Type B is selected then Type B will be in
cell B7 . so on and so on Thanks!
Sub ShowDialog()
With UserForm1.ListBox1
.MultiSelect = fmMultiSelectSingle
.RowSource = ""
.AddItem "Type A"
.AddItem "Type B"
.AddItem "Type C"
.AddItem "Type D"
.AddItem "Type E"
.AddItem "Type F"
.AddItem "Type G"

End With
UserForm1.Show
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default List Box connect to a cell

Hi
add a button to the form.

Private Sub CommandButton1_Click()
Range("B7").Value = ListBox1.Value
End Sub

select a value, click the button.

Regards
FSt1

"Marilyn" wrote:

Hello I'm a novice at this ... I created a userform - then I added the
button to the spreadsheet and it works. But how Do I add/connect the answer I
select to cell B7 of the spreadsheet . Example if someone selects Type A I
want type A to show in cell B7 , if Type B is selected then Type B will be in
cell B7 . so on and so on Thanks!
Sub ShowDialog()
With UserForm1.ListBox1
.MultiSelect = fmMultiSelectSingle
.RowSource = ""
.AddItem "Type A"
.AddItem "Type B"
.AddItem "Type C"
.AddItem "Type D"
.AddItem "Type E"
.AddItem "Type F"
.AddItem "Type G"

End With
UserForm1.Show
End Sub

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
Connect cell to a numbet on the Internet Haris Excel Discussion (Misc queries) 1 October 1st 07 12:45 PM
How do I connect a cell reference to a picture? stockyard Excel Discussion (Misc queries) 2 August 10th 07 08:01 PM
How do I connect two cells? If one cell changes the other changes arttrust Excel Discussion (Misc queries) 1 July 22nd 07 09:38 AM
how can I connect data in cell C to data in cell D? Angel82 Charts and Charting in Excel 2 March 8th 06 05:47 PM
How do I connect cell color to bar chart color? Bob Freerks Charts and Charting in Excel 1 February 1st 05 10:23 PM


All times are GMT +1. The time now is 12:11 PM.

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"