Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, but it was so much scrolling, that it's better to answer you in a
new post. The point is; -if nothing is written by user in textbox3, the existing text in the cell that relate to textbox3 will not be changed. if this still is confusing, I can send u the file Thanks very mush for your help. Aksel My answer still holds, but I didn't realize how much code you had... it holds for the ComboBox1 Change event. As for your CommandButton1 Click event, I have a question. Consider this snippet of your code... iCtr = ComboBox1.Value Select Case [iCtr] Case Is = 1 Range("B4") = Me.TextBox2 If TextBox3.Text = "" Then GoTo line1 Range("C4") = Me.TextBox3 line1: Case Is = 2 Range("B5") = Me.TextBox2 If TextBox3.Text = "" Then GoTo line2 Range("C5") = Me.TextBox3 line2: Case Is = 3 Range("B6") = Me.TextBox2 If TextBox3.Text = "" Then GoTo line3 Range("C6") = Me.TextBox3 line3: If iCtr is 1, it falls into the first Case statement. If TextBox3.Text is the empty string, you have it go to the "line 1" label (and to "line 2" label if it fails there, and so on). Why? If your code fell into the first Case statement, then iCtr equals 1, meaning it can't pass the second (or any of the other) Case statement conditions. All of this passing on through the various labels will never have a positive hit. I really am not sure what you are attempting here. Can you clarify what you think your code is doing? Rick *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
help with IF, if it is the answer.. | Excel Discussion (Misc queries) | |||
Calculator Answer Doesn't Match Excel Answer | Excel Discussion (Misc queries) | |||
plz answer | Excel Discussion (Misc queries) | |||
Question for Rick Rothstein | Excel Discussion (Misc queries) | |||
i cant get the exact answer e.g answer is 13.49% i got 13.00% | Excel Discussion (Misc queries) |