#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Combo Box



I try to make a macro that use a combo box (ListFillRange: "B4:B120",
Linked Cell: D2).
And a Command Button. When I select a cell from the ListFillRange with
the Combo Box, example "B6", and write a number in cell "D2". I would
like the value to be transfered to the cell "D6" (Offset method?) when I
push the command Button.
Can it be done?
Thanks

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Combo Box

Hei Aksel
do not use lincedcell in your combobox (= empty)
and try this.

I use range(e2) to put the selections address

Private Sub ComboBox1_Change()
Dim b As String
With ComboBox1
b = Range(.ListFillRange)(.ListIndex + 1).Address(False, False)
ActiveSheet.Range("E2") = b
End With





'
End Sub

Private Sub CommandButton1_Click()
Dim b As String
b = ActiveSheet.Range("e2").Value
Range(b).Offset(0, 1) = ActiveSheet.Range("D2").Value
End Sub


Regards

Yngve Ha en god dag.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Combo Box


Thanks for your solution yngve, the workbook is finish and working.

Og du har helt rett når det gjelder å takke for hjelpen. normal
folkeskikk, beklager!
Mvh. Aksel

*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Combo Box

An alternate interpretation:

Private Sub Commandbutton1_Click()
Range("D6").Value = Range("D2").Value
End Sub

--
Regards,
Tom Ogilvy

"Aksel Børve" wrote in message
...


I try to make a macro that use a combo box (ListFillRange: "B4:B120",
Linked Cell: D2).
And a Command Button. When I select a cell from the ListFillRange with
the Combo Box, example "B6", and write a number in cell "D2". I would
like the value to be transfered to the cell "D6" (Offset method?) when I
push the command Button.
Can it be done?
Thanks

*** Sent via Developersdex http://www.developersdex.com ***



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Combo Box


Thanks! for your help Ogilvy, your reply always work.
Aksel


*** Sent via Developersdex http://www.developersdex.com ***


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
linking a form combo box... results from the combo box to another Trey Excel Discussion (Misc queries) 1 July 15th 07 01:58 AM
combo reference on another combo box for picking address etc. kbjin Excel Worksheet Functions 1 December 8th 06 03:29 PM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 1 February 16th 05 02:05 AM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 0 February 15th 05 07:45 PM
Combo Box - Hide Combo Box w/Check Box Paul Excel Programming 5 December 3rd 04 10:58 PM


All times are GMT +1. The time now is 08:05 PM.

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

About Us

"It's about Microsoft Excel"