Private Sub Document_Open()
Dim dblInches As Double
Dim intfeet As Double
Dim resultMetres As Double
Dim resultCentimetres As Long
dblInches = intfeet
intfeet = InputBox("Please enter the amount of feet", 5)
'converting feet and inches to metres
resultMetres = intfeet * 12 + dblInches * 2.54 / 100
dblInches = InputBox("Please enter the amount of inches", 6)
'converting centimetres to metres
resultCentimetres = (resultMetres * 100)
msgbox(resultmetres & resultmetres " & resultCentimetres & _
"resultcentimetres" "the answer is")
Welcome to DevX Dave.
I don't know why you are using dblInches = intfeet first of because intfeet comes from the first InputBox and dblInches comes from the second.
Originally Posted by dave.h1
Which line is giving the compile error?
I've been programming with VB for 15 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
By amitid4forum in forum Java
Last Post: 11-24-2007, 07:34 AM
Last Post: 04-05-2007, 01:21 PM
By Chris H Baker in forum C++
Last Post: 01-17-2007, 02:37 PM
Last Post: 12-19-2006, 07:07 AM
By David Chu in forum .NET
Last Post: 01-08-2003, 03:58 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL