I am working on a currency program, however when someone inserts a letter, my program goes crazy. Here is the code where I do error checking, however I can never get it to work right.
if(choice < '6'){
// Get amount to be converted
cout << "Enter amount to convert: ";
cin >>...
My program is somewhat complete, except I am having trouble formatting the output to show dollar amount with 2 decimal places.
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
void main()
{
// variable declarations
double JPY_Rate = 107.9300 * 1.00;
double...
I'm writting a program to convert currency from US dollar to whatever and vice versa. Can someone please tell me the math forumla to convert? I am not sure whether I have to divide or multiply.
Hey LPlates thanx for the link. I just have a question on the code:
Option Explicit
Dim objExcel As Object ' Excel application
Dim objBook As Object ' Excel workbook
Dim objSheet As Object ' Excel Worksheet
Private Sub cmdCalculate_Click()
Set objExcel =...
Okay, I have a form that has a save button. When I click that save button, I want to populate an Excel spreadsheet with the data. The data is in text boxes. I did a search through the MSDN library and did an Internet search also, but I can't find anything that really helps.
Ok, there are several sections for this problem. First I am using a module for my global variables because I need the data stored on one form to integrate into another form.
This is what I have for my global variables:
Option Explicit
Public wheel1 As String, wheel2 As String, wheel3 As...
I am trying to show pass data to another form once the data is validated. My problem is that when I click the next form selection, it will validate the data and still move on to the next form. For example, I type in 23A6, it will validate the data as invalid and still move on to the next form...
That was awesome BlackKnight, but I get the following error when I click the validate button after I get to the fourth text box:
Run-time error '5':
Invalid procedure call or argument
Here is the rest of my code:
Option Explicit
Private Sub chkWheel5_6_Click()
Const conBtns = vbOK +...
I am trying to validate data in a text box. Basically the data in the text box will be nothing but numbers. Letters and anything else will be invalid data. Here is the code that I have so far:
Private Sub mnuDataValidate_Click()
Const conBtns As Integer = vbOK + vbExclamation +...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.