A quick word on blocking ads

It looks like you are using an ad blocker. That's okay. Who doesn't? But without advertising revenue, we can't keep making this site awesome. Click the link below for instructions on disabling adblock.

How to disable ad-blocker for Newschoolers

  • Home
  • News
    • Latest
    • Top Rated
    • Features
    • Podcasts
    • Tags
    • Interviews
    • Event Coverage
    • Opinions
    • Industry News
    • Gear
  • Forums
    • Categories
    • Ski Gabber
    • Non-Ski Gabber
    • Site Discussion
    • Media & Arts
    • Gear
    • Lady Gabber
    • Content Creators
    • AT & Backcountry
    • Regionals
  • Gear
    • Gear Guide 2024-25
    • Gear Guide 2023-24
    • The Roofbox Reviews
    • Editors' Picks
    • Gear Talk
  • Buy/Sell
    • Map View
  • Photos
    • Latest
    • Top Rated
  • Videos
    • Latest
    • Top Rated
    • Ladies
  • Store
  • More
    • Terrain Parks Guide
    • Contests
    • NS Giveaway
    • Top Rated Members
  • Search
  • Login
  • Login

Login to Newschoolers

Register Lost password?

Search Newschoolers

Preview

LOADING...
  • Forums
  • Non-Ski Gabber
  • Any1 here good at programming visual basic
  • Reply

Replying to Any1 here good at programming visual basic

BigRodRiley:
i need some help trying to create a program its very simple problem but here it goes:

i want to display the sum of two numbers in a list box. here is my code:

Public Class frmBob

Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
'Dim fmt "{0,15} {0,-6}"
Dim customer, laborCst, partsCst, totalCst, n, m, dblVar, sum As String

dblVar = txtSecondNum.Text
dblVar = txtThirdNum.Text
n = txtSecondNum.Text * 35
m = txtThirdNum.Text * 0.05 + txtThirdNum.Text
sum = n + m
customer = "Customer:"
laborCst = "Labor Cost:"
partsCst = "Parts Cost:"
totalCst = "Total Cost:"





lstOne.Items.Clear()
lstOne.Items.Add(customer)
lstOne.Items.Add(laborCst & n)
lstOne.Items.Add(partsCst & m)
'lstOne.Text = CStr(sum)
lstOne.Items.Add(totalCst & sum)
'lstOne.Text = CDbl(totalCst & sum)


as you can see the problems i'm having are in bold, i dont know how to get the output right.

Click to expand post

Follow Us

Newsletter

Subscribe to our newsletter and stay up-to-date with the latest news from Newschoolers and our partners

Subscribe
Register Contact Advertise Privacy Policy Terms of Use
Newschoolers has affiliate partnerships so we may receive compensation for some links to products and services.
© 2025 NEWSCHOOLERS, INC.
NEWSCHOOLERS is a registered trademark of NEWSCHOOLERS, INC.
  • Bike
  • Fantasy Surfer
  • Newschoolers
  • Powder
  • Ridemonkey
  • Snowboarder
  • Surfer
  • TransWorld Skateboarding