Problem search data by selected combobox & datepicker tools
Solved/Closed
abdelfatah_0230
Posts
73
Registration date
Thursday July 18, 2019
Status
Member
Last seen
July 23, 2022
-
Jul 5, 2020 at 04:39 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jul 23, 2020 at 10:47 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jul 23, 2020 at 10:47 AM
Related:
- Problem search data by selected combobox & datepicker tools
- Yahoo search history - Guide
- Safe search settings - Guide
- Tmobile data check - Guide
- Google input tools - Download - Mouse and keyboard
- Google.us search - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Updated on Jul 6, 2020 at 12:01 PM
Updated on Jul 6, 2020 at 12:01 PM
Hi Abdel,
You are setting your sheet incorrectly in the beginning of the Initialize part:
Set sh = sheet1
should be:
Set sh = Sheets("sheet1")
Not sure why you don't get an error for that.
Edit: Tried "Set sh = sheet1" in a simple test code and it worked. When I run your code, I'm getting a compiling error, saying that a variable is not defined and the "sheet1" text is highlighted. When I change "sheet1" into "Sheets("sheet1")", the error is gone.
PS: When posting codes, could you use the drop down arrow attached to the code button you would normally click and select "basic". This will make your code look like it is in VBA and makes it easier to reference code lines, since they are numbered.
Best regards,
Trowa
You are setting your sheet incorrectly in the beginning of the Initialize part:
Set sh = sheet1
should be:
Set sh = Sheets("sheet1")
Not sure why you don't get an error for that.
Edit: Tried "Set sh = sheet1" in a simple test code and it worked. When I run your code, I'm getting a compiling error, saying that a variable is not defined and the "sheet1" text is highlighted. When I change "sheet1" into "Sheets("sheet1")", the error is gone.
PS: When posting codes, could you use the drop down arrow attached to the code button you would normally click and select "basic". This will make your code look like it is in VBA and makes it easier to reference code lines, since they are numbered.
Best regards,
Trowa
Jul 7, 2020 at 03:14 PM
this is my file
https://www.dropbox.com/scl/fi/a4k54obah2x8uk43faouu/xc.xls?dl=0&rlkey=jlu45cec2s08mbofrp13ywbyk
Jul 14, 2020 at 11:51 AM
Looking at your file I notice that the left DatePicker is called DTPicker2 and the right one DTPicker1. So to display results in the listbox, we have to change the right DatePicker to select a start date before the dates in you table. Your file works fine for me.
But you probably did that on purpose, since I remember you having your entire sheet reversed.
The other thing that I can think of, is that you don't have the right references activated. You probably already used this, otherwise DatePicker wouldn't show. Top menu of VBA, Tools > References.
These are the references checked for my Excel:
Since there is an Object in the code, make sure the 3 references mentioning Object are checked.
Hopefully that solves it.
Best regards,
Trowa
Jul 16, 2020 at 02:57 PM
Jul 23, 2020 at 10:47 AM