Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1699 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     .NET and MSSQL :

Salathe! VB Help Please!

Thread title: Salathe! VB Help Please!
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
12-02-2007, 05:49 PM
#3
vbguru is offline vbguru
Status: I'm new around here
Join date: Dec 2007
Location:
Expertise:
Software:
 
Posts: 3
iTrader: 0 / 0%
 

vbguru is on a distinguished road

  Old

This is what I have for Question 2 - I feel it could be greatly improved though :/ - I still also have no way to check for all 4 digit numbers that do this.

[CODE]Option Explicit
'Written By Jack Morrison

Sub JMA3Q2()
Dim N0 As Integer
Dim N1 As Integer
Dim N2 As Integer
Dim Total As Integer
Dim Ftotal As Integer
Dim Success As Boolean

N0 = InputBox("Enter Your 4 Digit Number", "Magic Number Calculator")
N1 = InputBox("Enter the first 2 digits of the number", "Magic Number Calculator")
N2 = InputBox("Enter the second 2 digits of the number", "Magic Number Calculator")
Total = N1 + N2
Ftotal = Total ^ 2

(i think this is miner improvement than before )
If Ftotal = N0 Then
Success = True
MsgBox ("This number is a magic number: " & N0)
Else
Success = False
MsgBox ("This Number is not a Magic Number: " & N0)
End If

End Sub

if i can send you my variation of this programme ?

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed