Referencing InputBox Functions?

Oct 12, 2010

I'm working on a short project and am stuck on a something small near the end. I am writing a program to input income and expense of a company and then output the profit or loss. We are required to use InputBox Functions for the income and expenses which I have already done with their own buttons and now I am trying to code a calculate button to calculate if they made a profit or loss and output that to the user. I am not getting any errors and I am getting the correct format ($0.00) but no output. I am also going to attach the entire solution for anyone that needs it and it will be zipped.

Private Sub incomeButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles incomeButton.Click
Const prompt1 As String = "Enter a income amount. Click Cancel to end."
Const title1 As String = "Income Entry"
Dim inputIncome As String = String.Empty

[code]....

View 4 Replies


ADVERTISEMENT

VS 2010 - Referencing Shared Functions And Subs

Feb 1, 2011

I am porting an app from VB6 and I run into problems with references to functions and subs. Basically, let's say I have 2 classes added to the project, like this.

Public Class OOOOO
Public Shared Sub BBBBBBB(ByVal FileName As String)
...
Call CCCCCC()
Call DDDDDD()
etc.
...
End Sub
[Code] .....

I had to make the BBBB() shared to be able to call it from another function AAAAAA() from another class PPPPP. However, I get error on the references in the BBBBB(), that CCCC() and DDDD() have to be made also shared (so instead of 1 error I got number of errors).
When I tried to make them shared as well, I got tens and tens of errors due to other references of both variables and functions.

View 4 Replies

FLAG And InputBox - Display An InputBox For Each Word?

Jun 22, 2010

I have an assignment that asks me to:

1. create a button
2. when that button is clicked, an inputBox will appear to ask the user how many words they will enter.
3. then display an inputBox for each word.

For example, when the first inputBox appears, I enter "3" (meaning that I will enter 3 words).Then there should be 3 more inputBox (each inputBox allows me to enter only 1 word)After I enter the third word, there will be no more inputBox.How can we FLAG (stop) the inputBox, or let the inputBox know when to stop showing up?

View 1 Replies

VS 2008 : Have A Class Where The Functions Of The Same Name Are Both Instance Functions And Shared Functions?

Dec 6, 2010

What I am trying to do is have a class where the functions of the same name are both instance functions and shared functions.

Public Shared Function Get...(byval xx as xx)

and

Public Function Get...

The Public Function uses a Property xx created in the constructor, whereas the Shared Function has the parameters (byval xx as xx).

View 1 Replies

InputBox - Code To "read" Commands That Are Placed From The Inputbox?

Mar 9, 2011

Quick question on the InputBox. I am just learning this, what is the code to "read" commands that are placed from the Inputbox? I can do this in the command line: System.Console.Writeline(), System.console.Readline()

I just would like to know how read the line from the inputbox. Also when I debug my script do I -always- need to have the command prompt in the background?

View 1 Replies

Excel Maths Functions And Calls To All DLL Functions Documentation?

Jan 29, 2007

1) Is it possible to access the Excel mathematical functions without actually opening Excel?

I was thinking of through a DLL WinAPI call or maybe a delegate function or smaller program?

2) Does anyone know of a MS link or area that gives instruction on "how to" use every function of every Windows DLL at all?

Or for all those that Microsoft have chosen to document online at least.

View 1 Replies

Differences Between VB Functions And Convert.To* Functions?

Feb 19, 2009

While converting types, I have found myself using both VB functions and BCL Convert.To* methods.
E.g.)

Cstr() vs. Convert.ToString()
CInt() vs. Convert.ToInt32()
CDbl() vs. Convert.ToInt64()
etc...

Are there any subtle differences that should be noted?

View 1 Replies

[2005] MembershipUser Functions - See Exactly What The Functions Are Doing?

Mar 4, 2009

Is there a way to see exactly what the functions are doing. What i mean is there a way to see the class? I know what it does, i just want to know the code.
For example the function: Membership.FindUsersByName()

View 1 Replies

Keep My Inputbox Up?

Mar 3, 2010

Heres my code under the console application[code]...

How do I keep the inputbox up until the user guesses the right answer?

View 1 Replies

Add Input In A InputBox?

May 22, 2010

i'm making a multi-line text box, i need somone to add input in a InputBox, and it to write it to a setting (My.settings) but, i need each input to start with a new line, i've tried chr(10) + chr(13), but nothing works!

View 3 Replies

InputBox Is Empty?

Mar 20, 2009

[code]......If someone leaves the txt2 empty.... and they click the button how can I pull up another inputbox like for <= 0?

View 3 Replies

Inputbox Without A Title?

Nov 5, 2010

How do you make an Inputbox without a title?

I know you can do it this way:

inputbox("Please answer a question", " ", "")

This way you put a space in the Title property.

But is there another way to do this without putting a space in the Title property?

Maybe there is an inputbox without a title in vb.net?

View 2 Replies

Add An Cancel Button To Inputbox?

Mar 19, 2010

Heres my code so far:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[code].....

View 2 Replies

ASP Equivalent Of VB InputBox Function

Mar 4, 2009

VB has a function InputBox() that will prompt the user to enter a single value, then click OK. Is there a parallel functionality in ASP.NET, that will get the browser to pop up some kind of input box to return a single value? If not, how do you recommend I achieve this effect?

View 3 Replies

Capture Keys In Inputbox?

Jul 30, 2011

I'm making a key mapper in VB 2010, trying to capture keys pressed in the input box (tab, escape, backspace, space, caps, shift, ctrl, mwheelup, mwheeldown etc... non-alphanumeric keys).

View 1 Replies

Check If Ok Was Clicked In A Inputbox?

Feb 22, 2009

how can i check if ok was clicked in a inputbox? works fine with msgbox:

Dim Confirm = MsgBox("Are you sure?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Action Confirmation")
If Confirm = MsgBoxResult.Yes Then
'code
End If

but it returns an error with inputbox Conversion from string "" to type 'Double' is not valid.

View 2 Replies

Create A ComboBox In An Inputbox?

Jun 13, 2011

I have a problem with inserting a multiple selection option into my Inputbox.

IDEA: First the user chooses an excel file which he wants to open and then the sheet he wants to be read.

I can manage everything else except making the sheet selection a multiple option one.

At the moment the name of the wanted Excel sheet is typed into the text field in the inputbox. But I want the textfield to be a dropdownlist which would be populated with this:

With ComboBox1
For i As Integer = 1 To XL_WB.Worksheets.Count
Dim nimet As Excel.Worksheet = XL_WB.Worksheets(i)

[Code]....

how to create an Inputbox with Textfield --> ComboBox ??

View 6 Replies

Format Data From InputBox?

Feb 17, 2010

I'm playing around with the Select Case structure and have the following code:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim colour As String = InputBox("Please enter the name of a colour.", "Colours")

[code].....

View 2 Replies

How To Search Data Using Inputbox

Sep 18, 2011

How do i search data by using input box? it'sdo i use the inputbox for search data?.I have codes but not working. look my example code.

Dim conn As New SqlConnection
conn.ConnectionString = "server=Ryan-PC;Database=DRRM_Student_Database;User ID=sa;Password=*****;Trusted_Connection

[code].....

View 6 Replies

InputBox Is Namespace And Cannot Be Used As Expression

Feb 8, 2010

I'm just learning VB.net and am having a problem with InputBox. When I enter code such as:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim input As String
input = InputBox("Please Enter Your Name:")
I get the following error: 'InputBox' is a namespace and cannot be used as an expression.

View 10 Replies

Inputbox With Default Text?

Jan 18, 2010

Inputbox("test") will write test and expect an answer in an empty text box. Can the text box initially have some text in it? If yes, how?

View 1 Replies

Know If Inputbox Has Empty [integer]?

Feb 12, 2011

How to know if the input box did not put anything . I must still put zero in the inputbox so I cannot make a condition that only 1 - 10 is allowed. I need the zero value so how can I identify if that inputbox gives empty result so that I can prompt a msgbox saying you did not put anything?

View 1 Replies

Not Writing Out SaveFileDialog To InputBox

May 23, 2011

[code]...

It allows me to browse and/or create a file, but when I click the save button it transfers the new files directory to anothe savefiledialog box. I cant get it to close the search and place the path in the InputBox.

View 2 Replies

Restrict The Input On An InputBox?

Oct 6, 2009

I am wanting to restrict the input on an InputBox and I am confused about how to do that. I know what to do on a text box to restrict input to numbers, the ".", and the backspace key, but I cannot figure out how to tie the input restrictions to the pop up InputBox. Do InputBox 's have an object name attached to them? Or are they just called InputBox.whatever?

View 8 Replies

Use More Text Boxes In One Inputbox?

Jun 19, 2012

I was wondering if there's a way to use more text boxes in a single inputbox?[code]...

View 2 Replies

Using A InputBox As A Dialog Result?

Aug 27, 2011

InputBox be used instead of a Dialog, and at the same time setting the Button Text Properties to display Afrikaans words like Ja Nee?

View 2 Replies

Using An Inputbox To Move A Picture?

Mar 1, 2009

I need to use an inputbox to move a picture.I need to it using buttons left,rigt,down and up when I press the buttons an inputbox needs to appear there i need to insert the number of units to move the picture and the the number of times that the picture will move.Private Sub Command2_Click()j = InputBox("type a number:", "type units to move", "type")Picture1.Left = Picture1.Left + x1If (Picture1.Left >= Form1.ScaleWidth - Picture1.Width Or Picture1.Left <= 100) Then x1 = -x1 End IfEnd Subthis is an example that i tried to do

View 2 Replies

Using Inputbox As Password Entry?

Apr 21, 2006

i have been asked to make a form password entry but cant use a text box as it's opened from an MDI parent form so no main screen to speak of as such, my problem is at current the password works fine as shown below its basic stuff.

If InputBox("Please Enter Administration Password." _
, "Password Entry", "") = "trafficlight" Then
'Close current frmMDIChild and set the new form

[code]....

i want the input box to mask the characters been entered i know i could create my own input box and call that but is there a way to use the Default inputbox to mask the character input maybe watch the key presses saving input to a variable and displaying the asterix in its place? or am i overthinking it and there is a very easy solution like an inputbox that already masks input by a user.

View 4 Replies

Validate The Data In The Inputbox?

Mar 6, 2012

im having trouble try to validate the data in the inputbox. I am trying to make sure only integers/decimals are entered, but the code is failing to reconize it in the loop, and the loop dosent promt the user to a valid number. What am i doing wrong or this a weakness of the inputbox?

'Developer- John Nelson Date- March 5, 2012 Application Name- Semester Final Averages Purpose-This application allows an instructor to enter up to 10 project scores from a course for a semester compute a students average score. The application displays the final average for the semester with the two lowest grades removed from the average. The eight scores are sorted in order and final averages are written to a file named grades.txt

[Code]...

View 3 Replies

VS 2010 Recurring Inputbox?

Mar 30, 2012

So my program works fine adds everything up....the problem now is the recurring input box...i understand why it`s recurring as its getting called from GetInStock function then the ReadyToShip function....i only need it to show up once...after the calculate button is clicked....could someone give me some insight as to how to fix this? Im new to VB and have no idea..

[Code]...

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved