5 Replies - 361 Views - Last Post: 20 October 2013 - 10:54 AM Rate Topic: -----

#1 littleone  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 18-October 13

Hide zero in an output range from -10 to 10

Posted 20 October 2013 - 10:10 AM

I have written a program where I do not want the 0 (zero) to show in the list box when I enter say a range from -10 to 10. I have the rest of the formula working this is the last check I want it to do for the final display but I am not sure what to put after the then to complete the statement. I know this is vague but is there some type of generic code or do I need to be more specific?

If textbox <> 0 then

but I am not sure what to do next.

help would be appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: Hide zero in an output range from -10 to 10

#2 astonecipher  Icon User is offline

  • D.I.C.
  • member icon

Reputation: 807
  • View blog
  • Posts: 3,521
  • Joined: 03-December 12

Re: Hide zero in an output range from -10 to 10

Posted 20 October 2013 - 10:31 AM

You just need to check the value before adding it to the list so if the number does not = 0 add the number to the list if it does go to the next number.
Was This Post Helpful? 1
  • +
  • -

#3 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3838
  • View blog
  • Posts: 13,596
  • Joined: 12-December 12

Re: Hide zero in an output range from -10 to 10

Posted 20 October 2013 - 10:35 AM

Post your current code wrapped in code-tags.

But, as astonecipher says, you just need to skip the 0 value. If you are looping from -10 to 10 then you need to put this 0-check within the loop.
Was This Post Helpful? 0
  • +
  • -

#4 littleone  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 18-October 13

Re: Hide zero in an output range from -10 to 10

Posted 20 October 2013 - 10:46 AM

astonecipher I am quite new to programing so I am not sure what you mean by "check the value before adding it to the list" can you elaborate a little.
Was This Post Helpful? 0
  • +
  • -

#5 astonecipher  Icon User is offline

  • D.I.C.
  • member icon

Reputation: 807
  • View blog
  • Posts: 3,521
  • Joined: 03-December 12

Re: Hide zero in an output range from -10 to 10

Posted 20 October 2013 - 10:52 AM

post your code in code tags "

" to show what you have tried.
Was This Post Helpful? 0
  • +
  • -

#6 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3838
  • View blog
  • Posts: 13,596
  • Joined: 12-December 12

Re: Hide zero in an output range from -10 to 10

Posted 20 October 2013 - 10:54 AM

Quote

"check the value before adding it to the list"

This statement does not require any programming knowledge, it's in plain English. If you are about to add a value to your ListBox, and that value is 0, then don't Add it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1