Help!
i need to make an input box using coding that asks for two numbers and subtracts the first num from the second one
then, i need a msgbox that shows the answer
stop project until i get better
wait
use a totally different macro
don't do it ever again
Help!
i need to make an input box using coding that asks for two numbers and subtracts the first num from the second one
then, i need a msgbox that shows the answer
Please Login or Register to view this content.
How about:
Please Login or Register to view this content.
Gary's Student
jakobshavn, u didn't define N1 or N2
Bob, there is an error when i run it ( compile error)
You are correct! The macro should run without the definitions.
Jakob, u didn't define N1 or N2 so there is an error
is N1 an integer,string etc.?
Dim them as Variants
When you respond, touch Go Advanced at the bottom and use the paperclip.
I've redone Jakobshavn's code a bitThere should be no errors now with Option Explicit on.Please Login or Register to view this content.
---------- Post added at 02:41 PM ---------- Previous post was at 02:39 PM ----------
I just ran Bob's code and didn't receive any errors. What was the description of the error thrown?
Last edited by Mordred; 08-22-2012 at 04:45 PM.
If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.
---Keep on Coding in the Free World---
Use the marine macro not the inputbox macro
---------- Post added at 04:26 PM ---------- Previous post was at 04:25 PM ----------
N1 and N2 weren't defined yet
---------- Post added at 04:27 PM ---------- Previous post was at 04:26 PM ----------
Don't change the project unless u can improve it
I can't say that I understand your post 13! Did you try the amended code that I did? With Bob's, did you copy and paste it into your workbook because the code you have in there is not the same?!?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks