Tuesday
July 22, 2014

Homework Help: Vba

Posted by Dom on Monday, July 8, 2013 at 6:20am.

I'm trying to write a sub that asks how much oil I made, and then gives me number of barrels needed to hold oil, cost of producing oil, and profit from oil. This is what I have so far, I'm not sure what to do.

Sub Oil()

Dim barrels As Variant
Dim tons As Integer

InputBox "How many tons of oil were produced?"

Barrels = Gallons / 10
cost = 0.38 * Barrels
profit = 0.27 * Barrels

MsgBox "" & Barrels & " barrels needed to hold milk"
MsgBox "Cost of producing oil = " & cost & ""
MsgBox "Profit of producing oil = " & profit & ""
End Sub

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

macroeconomics - Suppose that France and Denmark both produce oil and olives. ...
math - Tema Oil Refinery ( TOR ) is the only company mandated to refine crude ...
science - Questions about oil: 1. what is the main product we get from oil? 2. ...
math! - an oil well produceds 2500 barrels of oil during its firt month of ...
math - fractions - Hello, I need help for my 5th grader...Solve the problem by ...
Process Technology - How many minutes will it take for an oil well producing ...
economics - where was the first oil factory and is it still standing today What ...
chemistry - Looking up the specifications of an oil online, the spec sheet ...
Chemistry - Hello! I was wondering why is it that it is safe to eat olive oil, ...
chemistry - find the conversion factor A barrel of oil is exactly 42 gallons. ...

Search
Members