![]() |
Excel 2000 VBA Form Combobox value
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 |
Excel 2000 VBA Form Combobox value
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 |
Excel 2000 VBA Form Combobox value
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 |
All times are GMT +1. The time now is 01:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com