PC Review


Reply
Thread Tools Rate Thread

Combobox value to be set as Target for referencing from. How ?

 
 
Corey
Guest
Posts: n/a
 
      1st Jan 2007
With the following section of code, i currently have a combobox value placed
in cell O4.

With ActiveWorkbook.workSheets("Inspections")
..Select
Range("O4").Value = ComboBox1.Value
End With

The combobox value is taken from sheet4 and placed in O4 in sheet2 for
viewing when required.

This value from sheet4, is ALWAYS in column A, but can be in any row.

I want to place many other values from sheet4 into sheet2 also, but need to
reference these other values ACCORDING to where the value in the combobox
value is.
IE.

I want to use some thing like, if combobox1.value was in seet4.range("A1")
then :

Combobox1.value = sheet4.target cell

sheet2.range("A5").value = targetcell.offset(0,4).value ' I can then place
the other values from sheet4 into sheet2 by where those values are related
to the location of the combobox value(Target).


To hopefully explain clearer.
EG.

sheet4:

A1 = 500
A5 = ABC
B3 = Yellow
C2 = 1000


When the combobox value is selected(sheet4.column A):

Sheet2:
Target = 500
A5 = target.offset(0,4)
B3 = target.offset(1,2)
C2 = target.offset(2,1)
etc....

All these values that are brought in from sheet4, are NOT in any specific
ROW.
Therefore i need to refernce them by WHERE the combobox value WAS.

Can anyone help me get started on this ?

Corey....



 
Reply With Quote
 
 
 
 
Corey
Guest
Posts: n/a
 
      2nd Jan 2007
Any Takers???

How do i set the combobox value chosen to be a target or address to locate
other values from?

COrey....
"Corey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> With the following section of code, i currently have a combobox value
> placed in cell O4.
>
> With ActiveWorkbook.workSheets("Inspections")
> .Select
> Range("O4").Value = ComboBox1.Value
> End With
>
> The combobox value is taken from sheet4 and placed in O4 in sheet2 for
> viewing when required.
>
> This value from sheet4, is ALWAYS in column A, but can be in any row.
>
> I want to place many other values from sheet4 into sheet2 also, but need
> to reference these other values ACCORDING to where the value in the
> combobox value is.
> IE.
>
> I want to use some thing like, if combobox1.value was in seet4.range("A1")
> then :
>
> Combobox1.value = sheet4.target cell
>
> sheet2.range("A5").value = targetcell.offset(0,4).value ' I can then place
> the other values from sheet4 into sheet2 by where those values are related
> to the location of the combobox value(Target).
>
>
> To hopefully explain clearer.
> EG.
>
> sheet4:
>
> A1 = 500
> A5 = ABC
> B3 = Yellow
> C2 = 1000
>
>
> When the combobox value is selected(sheet4.column A):
>
> Sheet2:
> Target = 500
> A5 = target.offset(0,4)
> B3 = target.offset(1,2)
> C2 = target.offset(2,1)
> etc....
>
> All these values that are brought in from sheet4, are NOT in any specific
> ROW.
> Therefore i need to refernce them by WHERE the combobox value WAS.
>
> Can anyone help me get started on this ?
>
> Corey....
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing a ComboBox in VBA Paul Kraemer Microsoft Excel Programming 3 9th Feb 2010 07:34 PM
referencing combobox tracktraining Microsoft Excel Programming 1 20th Feb 2009 01:32 AM
Re: ActiveCell.FormulaR1C1 referencing a moving target. Bob Phillips Microsoft Excel Programming 1 19th Dec 2006 04:33 PM
Referencing A ComboBox PC User Microsoft Access 1 7th Mar 2005 11:06 PM
referencing ComboBox salihyil Microsoft Excel Programming 0 26th Feb 2004 09:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:52 AM.