Hi, again;
Now i have 2 questions.
1.- Its posible to jump from the user form to one sheet. i mean, to programm one command button to, for example go and check the results of your modifications made by your userform?
2.- how can i pop up a comment if a value A > Value B,. I mean, im going to put some values in the textbox, this values will modify some cells in the same sheet, but if the sum of these modified cells are > than the value of one cell in the same sheet, i want to show a commet like " watcht out, you are excedding your needs".
hope you can help me
thank you people
I would check to see that the condition is met BEFORE writing the userform values to the worksheet and prompt the operator if the sum of values exceeds the limit.
Here is the basic approach, code assigned to the command button:
Option Explicit Private Sub CommandButton1_Click() Dim n1 As Long, n2 As Long n1 = Me.TextBox1.Value n2 = Me.TextBox2.Value With Me If n1 + n2 > Sheet1.Range("A1").Value Then MsgBox "exceeds needs" End If End With End Sub
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks