asked on
Userform in Switched on mode after Clicking Calculate Win button and automating monthly totals
1) Requesting to make the userform stay switched ON after clicking the Calculate Win button , so I can do continuos testing.?
Example clicking OK button would be an execution of the task, but can the userform still stay switched on , till I close it. If I need to enter new set of numbers quickly for testing , then Userform staying on will speed up the testing of different set of numbers
The userform shows only upto 2023, could you kindly add future years.
2) Could you kindly automate the totals of each month to have a quick glance as well example in below picture highlighted in yellow fill are the totals for each month
File Attached :29252151c 3.xlsb
Till which year is added after 2024 for all the keno tabs and lotto workbook.I'm sorry but I'm not sure what that means, so all I can say is that the Find Wins userform Years listbox will add the new year every year.
I've added code to maximise or minimise the form which is useful when working like this
29252151c-3.xlsb
ASKER
@ roy
The form is modeless so you can work on the sheet whilst it is loaded.
Not sure what you meant by modeless?
In the OK button this line hides the form
when you say this line which line were you referring to
Me.Hide so remove it.
Not sure what that meant,
I've added code to maximise or minimise the form which is useful when working like this
Thanks for adding it, but not sure how it would help as I can clearly see the Year, Month and Time Slots in below snapshot
ASKER
@martin.
Requirements have been met. Brilliant Job. I not done thorough testing but looks good so far with whatever testing I have done.
The userform stays switched on and I can rapidly continue working on new sets of draws.
Thanks for adding a clear button and Monthly totals and highlight , as that is definitely helping speed up testing.
Happy New Year 2023.
- Removed "All" from the userform since it didn't do anything
- Added an error check for no data in month as in the case right now in this workbook for 2023
- Corrected a bug where if there were no matches in row 3, the entire row was deleted including Year and Month
29252337a.xlsb
ASKER
thank's for the nice testimonial.
welcome
Yes you are right the All doesn't do anything.
Thanks for correcting the bug.
ASKER
Win Calculator tab : 3pm draw not showing monthly totals and other draw picks also not showing monthly totals. 2 examples below.
The draw was a 3 pick draw : 1 2 3 in below picture
But on checking another 3 pick draw of 1pm which 10 12 13, I noticed some had monthly totals but some were missing in below picture
Not sure why it is missing out some monthly draw totals.
I have not updated the workbook as it is the same 29252337a workbook that I downloaded, which I was testing with more examples.
I chose #1 because it is consistent with keeping a blank row between months.
29252337b.xlsb
ASKER
You're right #1 is consistent. Thanks, Will retest just waiting for server update.
ASKER
@Roy
Thanks for taking the time to look at the question.
ASKER
Yes I did more testing now and 2022 is ok.
But previous years are still showing draws that do not have wins like in below picture.
LIke the 2022, could the rest of the years also show only winning draws, because at the moment it is not .
I think the non winning draws are showing up for 2013 , 2012 and backwards.
You might wonder why I am checking so much backwards in time.
The reason for that was I was looking for a winning ($1000) 6 pick draw for 70, 71, 72, 73 , 74 , 75, but since I could not find it in the year 2022, I kept on testing and checking backwards, if the above 6 pick hit in the previous for 10 am. only.
I cannot believe that the above 6 pick draw did not hit in the last 10 yrs. from 2012 to 2022 for 10 am draw only
So in order to cross check that , I opened the Main tab and selected draw period from 1 Jan 2012 to Dec 2022, but it is taking very long to process , just wondering if the process speed can be improved ?
could the rest of the years also show only winning draws, because at the moment it is not .That's my fault. I neglected to consider that in previous years there were less than 4 draws per day.
ASKER
That is happening because there are no times in the WNR and to compensate for that the code for the Wins Calculator tab assumes that there are always 4 draws per day. The oldest one is then assumed to be 10 AM, the next oldest one 1 PM, etc. In actuality (as you know) looking backward in time there are only 2 draws per day starting in Sunday 24 August 2014 and only 1 draw per day starting in Monday 10 May 2004 and so that scheme falls apart.
Given that
- there are no times in the WNR, and
- the changes occur mid-month and the Wins Calculator tab does things by month, and
- the time of day for those early draws are different, and
- at some future date a 5th draw might be added
Please let me know what you think.
It looks to me like the $90 is the total of everything above it including the subtotals. Please make sure you are using the 'b' version of the workbook and if so, please try doing it just for one month and then doing the full year again and let me know of the problem persists.
ASKER
the only thing I can think of to do is to create code that adds the times of the draws to column Y in the WNR each time a Keno file is downloaded from the Keno server and each time a manual draw is added. I can do that but it will take some time.
That is a good suggestion. Yes take your time.
Instead of the Y column , would it possible to add the Draw times to a new Column before the A column in below picture .
It will be easy for me to cross refer Draw number and times if they are in adjacent columns.
ASKER
ok. I did not realise it is complex than that. I leave it you then.
ASKER
ok . I will try to see if the $90 is popping up again. If it does I will upload the workbook
ASKER
Wins Calculator not working correctly
Currently Dec 22 , is showing only $4 wins is incorrect.
There were wins on Dec 1, Dec 2, Dec 12, but the code missed out those wins .
Also seems like 11th Dec, 10am (draw number is 22252 and not 22255) wins is paired with 6pm for row 3 draw in below picture
I was testing wins for 10 am draw for Jan to Dec 22, when I saw Dec 22 was only $4 win, I realised something is not right here. 6 pick draw testing was for 70 71 72 73 74 75
Could you kindly check what is wrong ? I have attached workbook to check
Updated workbook till 5/1/23 1pm attached :
- You should no longer see the $0.00 results
- Draw times now appear in column Y of the WNR
- Among the many changes were some that might resolve the missing December 2022 wins
I tested the following:
- Downloading a new Keno file
- Selecting years and months in the Wins Calculator tab where there were 4, 2 and 1 draws per day
- Manual draws
29252337c.xlsb
ASKER
Sorry did not realise I had not uploaded the file.
Anyway after server updating to 3rd Jan and manually updating 4th and 5th Jan, the results of the Wins Calcuator seems to match yours. thanks
I have yet to test for backward years , just tested for 2022 with pick of 70 71 72 73 74 75
ASKER
Since I have no access to desktop computer, I was trying the workbook on Office 365, but the buttons are not clickable, the cursor stays on the cell behind the button
ASKER
I do not have a laptop dock.
What was the solution about rebooting.?
ASKER
Getting error when clicking on Calculate win in what if tab.
Also I was sure you had changed the date format for nz, but is as follows
ASKER
No worries. In the What if tab, when you click the Calculate Win tab, it brings up a userform where you can type in the draw numbers
ASKER
Correction : the What if tab , depends on the draw typed in D:M of the Record tab.
When any draw row of 10,1,3 or 6 is clicked , then click on what if in the Record tab and that opens up What if tab.
but comes up with this dialog inspite of selecting the cell of the row
Now Jan 23 cannot load in What if tab, due to the above error
the runtime error 91 popped up with the default draws loaded.
29252337d.xlsb
ASKER
Thanks. I did not get to test as I am sick got COVID fever , sore throat and very bad cough
ASKER
ASKER
Workbook updated manually in Office 365 on laptop till yesterday attached.
29252337d.xlsb 28 Jan 3pm.xlsb
In the attached workbook I've corrected that and made sure that all the other buttons are all named correctly.
29252337e.xlsb
ASKER
Gotcha. the e workbook worked thanks
In the Wins Calc tab, I tried to paste the number generated from the Main tab Show Palette, but all the nine numbers got pasted into one cell.
So the request was if it was possible to instead have another number generator that can be integrated into the above userform in the Wins Calc tab, as typing the numbers in the above blank cells is getting time consuming.
In the Wins Calc tab, I tried to paste the number generated from the Main tab Show Palette, but all the nine numbers got pasted into one cell.The selections from the palette in the Main tab show up in the Typed Nums. I can add a button at the bottom of the Find Wins userform that will copy each of the Typed Nums to that userform. Would that be acceptable?
If not then the creation of a palette in the Wins tab is non-trivial and I need you to ask a new question.
ASKER
If not then the creation of a palette in the Wins tab is non-trivial and I need you to ask a new question.
I have posted the new question.
ASKER
M on the road for the day. Will get to check out on the computer later at night.
Till which year is added after 2024 for all the keno tabs and lotto workbook.