Select range with Combobox query.

shumba

Board Regular
Joined
Oct 5, 2010
Messages
168
Hi,

I have a combobox in a workbook named “Full list and charts for 2 August” . This combobox is populated from a list in another workbook called “Copy of Programme Trial Ver 28 2 August”. Currently when I select an item in the Combobox it will copy the selected entry (i.e. just the one cell). I would like to extend this range to include all the data in the row.

Please will someone show me how to do this . The procedure I am using follows.

Code:
Private Sub ComboBox2_Change()
      With ComboBox2
      Workbooks("Copy of Programme Trial Ver 28 2 August").Sheets("Price Log").Range("a2").Cells(.ListIndex + 1, 1).Copy
      End With
  End Sub
Any help will be much appreciated.

Thanks,

Rob.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try something like this...

Code:
Private Sub ComboBox2_Change()
      With ComboBox2
      Workbooks("Copy of Programme Trial Ver 28 2 August").Sheets("Price Log").[COLOR="Red"]Rows(2 + .ListIndex)[/COLOR].Copy
      End With
 End Sub
 
Upvote 0
Try something like this...

Code:
Private Sub ComboBox2_Change()
      With ComboBox2
      Workbooks("Copy of Programme Trial Ver 28 2 August").Sheets("Price Log").[COLOR=Red]Rows(2 + .ListIndex)[/COLOR].Copy
      End With
 End Sub

Thanks for your help. I will give it a go as soon as possible.

Rob.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,723
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top