Hi,
I'm trying take the first letter from combobox10, divide by 2 and put the result in textbox27>
Any ideas??
![]()
Please Login or Register to view this content.
Hi,
I'm trying take the first letter from combobox10, divide by 2 and put the result in textbox27>
Any ideas??
![]()
Please Login or Register to view this content.
Well, I don't understand VBA, but I can see that the code snippet is looking at the last letter of the value in textbox 10 and multiplying it by two if the value in combobox 27 is upper case (I think). Have you tried tweaking this for your stated purposes? What did you come up with?
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
This??
![]()
Please Login or Register to view this content.
Why would you multiply if the intention is to divide? The multiplication operator is *, but to divide, you need /. Have you actually tried your suggestion?
sorry, yes its a multiplication required. testing now
Tried this but it doesn't work?
![]()
Please Login or Register to view this content.
What is this supposed to mean?
You are not actually comparing the value to anything.![]()
Please Login or Register to view this content.
Don
Please remember to mark your thread 'Solved' when appropriate.
yes, I've scraped code together. The uppercase command is not necessary, trying to rework
Essentially, I'm trying to take the first number from ComboBox10, multiply by 2 and paste the result in TextBox27
That would simply require
![]()
Please Login or Register to view this content.
Still nothing. I'ts probably something illogical that I've done :-/
Might be easier to show you the file?
Press Axle generator
select 54 SQ
select STUD/PCD
Select 5/165
Result in TextBox27 - Wheel Nut
Why have you put the code into the change event of Textbox27? (I believe we've had this conversation before)
Also, I notice that you have used Application.Enableevents = False in at least one of your event routines. That does not affect events on userforms so serves no purpose the way you are using it.
How do I know what is the the most appropriate Box to insert changes. I though that the box that is affected is where the changes are to be made?
I'll delete the the application.EnableEvents
Last edited by bralew; 10-31-2016 at 05:51 AM.
The Change event for a control is triggered when that control is changed. So the Change event for Textbox27 is only fired when you change Textbox27. It is therefore not the place to put code to populate Textbox27. If Textbox27 depends only on the value of Combobox10, then you should be using an event triggered whenever Combobox10 is changed.
Got it, thank you very much. I've changed to ComboBox10 and it works well :-)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks