Copy dropdown selection into worksheet

dmqueen

Board Regular
Joined
Aug 5, 2014
Messages
53
Pleas help!
I have a dropdown list in Column B. I need to be able to copy the selected value into the worksheet by tomorrow or I'm fired! As simple as possible please!
 

dmqueen

Board Regular
Joined
Aug 5, 2014
Messages
53
The dropdown is on the sheet, but I need to copy the value onto the sheet from within a macro.
 

NeonRedSharpie

Well-known Member
Joined
Jul 14, 2014
Messages
1,678
so your syntax is just:

Code:
Sheet.Range(Cell1,Cell2).Value = Sheet.Cells(Row, Column)
where the row and the column point to your drop down value.
 

dmqueen

Board Regular
Joined
Aug 5, 2014
Messages
53
For example, on the 1st sheet it's dropdown15 I thought could apply it to my variable through myVariable = dropdown15.value or myVariable = dropdown1.boundItem but I can't get at the value I can copy it into the sheet where I want it if I could get at it.
 

dmqueen

Board Regular
Joined
Aug 5, 2014
Messages
53
Dear Neon,

tried your suggestion:

<code>


Sub fContinueEntry()
'Get Machine value

RowNum = ActiveCell.Row
<highlight>
Sheet.Range(RowNum, 3).Value = Sheet.Cells(B, 1)</highlight>
Dim MachineIndex As Integer
MachineIndex = ActiveCell(RowNum - 4, "B").Value
Dim Machine As String
Machine = DropDown5.TargetValue
ActiveCell(RowNum, 2).Value = Machine
Sheet.Range(RowNum, 2).Value = Sheet.Cells(B, 1).Value
Dim Tube As Double
Tube = InputBox("Enter Tube")
ActiveCell(NewRowNum - 10, 2).Value = Tube

Dim CLR As Double
CLR = InputBox("Enter C.L.R.")
ActiveCell(NewRowNum - 10, 3).Value = CLR

Dim Grip As Double
Grip = InputBox("Enter Grip Length")
ActiveCell(NewRowNum - 10, 4).Value = Grip

End Sub
/<code>
And while it compiles ok, I get a Runtime Error 424 Object Required when try to run it. Am I doing something wrong?</code></code>
 
Last edited:

NeonRedSharpie

Well-known Member
Joined
Jul 14, 2014
Messages
1,678
As in a data validation drop down? There isn't any object called dropdown that I'm aware of.
 

dmqueen

Board Regular
Joined
Aug 5, 2014
Messages
53
The Controls call it Drop Down 5. It's a lengthy Listbox that populates from a named range on a separate sheet that I want the user to be allowed to enter a new choice that will also add to the named range and present as a choice net time, but for right now I'd be happy if I could just pull the selected value from the starting list.
 

Forum statistics

Threads
1,082,258
Messages
5,364,081
Members
400,778
Latest member
Canadian Sal

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top