LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default answer to Rick

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with IF, if it is the answer.. Lost Will Excel Discussion (Misc queries) 1 November 19th 08 04:26 AM
Calculator Answer Doesn't Match Excel Answer GwenH Excel Discussion (Misc queries) 3 October 20th 08 10:17 AM
plz answer Deeps Excel Discussion (Misc queries) 2 September 21st 08 09:20 AM
Question for Rick Rothstein Jenny B. Excel Discussion (Misc queries) 0 June 27th 07 07:06 PM
i cant get the exact answer e.g answer is 13.49% i got 13.00% zai Excel Discussion (Misc queries) 3 June 9th 05 01:00 PM


All times are GMT +1. The time now is 05:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"