Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all!
I'm trying to do a search based on a Form Combobox. When the user selects a value from the available list, I want a series of other values on the form to be populated. The macro is located below. When I try to run the combobox, I can select OK from the list, but then......I get an error on the Find statement, and when I View Locals, DropDown11 is Empty. Any help greatly appreciated. cheers, Matt. Sub DropDown11_Change() ' ' Sheets("Log").Select Selection.Find(What:=DropDown11.Value, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _ MatchCase:=False).Activate iRow = ActiveCell.Row iCol = ActiveCell.Column Sheets("Daily").G9.Value = Cells(iRow, iCol + 1).Value Sheets("Daily").G10.Value = Cells(iRow, iCol + 2).Value Sheets("Daily").G11.Value = Cells(iRow, iCol + 3).Value Sheets("Daily").G12.Value = Cells(iRow, iCol + 4).Value Sheets("Daily").G15.Value = Cells(iRow, iCol + 5).Value Sheets("Daily").G16.Value = Cells(iRow, iCol + 6).Value Sheets("Daily").Select End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The error message is "Object Required". Sorry for the omission.
cheers, Matt. "Matt." wrote in message .. . Hi all! I'm trying to do a search based on a Form Combobox. When the user selects a value from the available list, I want a series of other values on the form to be populated. The macro is located below. When I try to run the combobox, I can select OK from the list, but then......I get an error on the Find statement, and when I View Locals, DropDown11 is Empty. Any help greatly appreciated. cheers, Matt. Sub DropDown11_Change() ' ' Sheets("Log").Select Selection.Find(What:=DropDown11.Value, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _ MatchCase:=False).Activate iRow = ActiveCell.Row iCol = ActiveCell.Column Sheets("Daily").G9.Value = Cells(iRow, iCol + 1).Value Sheets("Daily").G10.Value = Cells(iRow, iCol + 2).Value Sheets("Daily").G11.Value = Cells(iRow, iCol + 3).Value Sheets("Daily").G12.Value = Cells(iRow, iCol + 4).Value Sheets("Daily").G15.Value = Cells(iRow, iCol + 5).Value Sheets("Daily").G16.Value = Cells(iRow, iCol + 6).Value Sheets("Daily").Select End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think maybe I should be a little more clear on what I'm doing.
The look up list is a list of dates. Which is why I'm using a form control instead of a Toolbox control. But I don't have a form. I'm not sure if that makes a difference. Let me know if I need to add anything else. cheers, Matt. "Matt." wrote in message .. . Hi all! I'm trying to do a search based on a Form Combobox. When the user selects a value from the available list, I want a series of other values on the form to be populated. The macro is located below. When I try to run the combobox, I can select OK from the list, but then......I get an error on the Find statement, and when I View Locals, DropDown11 is Empty. Any help greatly appreciated. cheers, Matt. Sub DropDown11_Change() ' ' Sheets("Log").Select Selection.Find(What:=DropDown11.Value, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _ MatchCase:=False).Activate iRow = ActiveCell.Row iCol = ActiveCell.Column Sheets("Daily").G9.Value = Cells(iRow, iCol + 1).Value Sheets("Daily").G10.Value = Cells(iRow, iCol + 2).Value Sheets("Daily").G11.Value = Cells(iRow, iCol + 3).Value Sheets("Daily").G12.Value = Cells(iRow, iCol + 4).Value Sheets("Daily").G15.Value = Cells(iRow, iCol + 5).Value Sheets("Daily").G16.Value = Cells(iRow, iCol + 6).Value Sheets("Daily").Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
form control combobox | Excel Discussion (Misc queries) | |||
Form Help - ComboBox - VBA | Excel Discussion (Misc queries) | |||
Disable and enable dropdown combobox(Form Control) | Excel Discussion (Misc queries) | |||
link form combobox | Excel Worksheet Functions | |||
VBA Form ComboBox question | Excel Worksheet Functions |