Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set Excel Combobox Value from another Excel sheet

Status
Not open for further replies.

gtaborda

Programmer
May 13, 2007
75
GB
Hi

I have an Excel sheet (1st) which opens another Excel sheet (2nd) and copies certain information from 1st sheet to 2nd sheet.

On the 2nd sheet, there is a Combobox.
I would like to give that combobox a Value from the 1st sheet.

I've tried ExcelObj.Combobox1.value=Range("A1").value but it doesn't work.
I also tried ExcelObj.Combobox1.text=Range("A1").value but same problem

Any ideas ?

thanks in advance

 
Found a way to do it.

objexcel.Sheets("NameofSheet").combobox1.Value = range("A1")

thanks
 




BOTH objects should use full references...
Code:
objexcel.Sheets("NameofSheet").combobox1.Value = [b]objexcel.Sheets("NameofOTHERSheet").[/b]range("A1")

Skip,

[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top