Results 1 to 14 of 14

Variables declaration

Threaded View

nikolaygeorgiev Variables declaration 06-25-2013, 12:14 PM
tigeravatar Re: Variables declaration 06-25-2013, 12:19 PM
nikolaygeorgiev Re: Variables declaration 06-25-2013, 12:22 PM
HaHoBe Re: Variables declaration 06-25-2013, 12:24 PM
nikolaygeorgiev Re: Variables declaration 06-25-2013, 12:35 PM
LaffyAffy13 Re: Variables declaration 06-25-2013, 12:47 PM
nikolaygeorgiev Re: Variables declaration 06-25-2013, 12:49 PM
nikolaygeorgiev Re: Variables declaration 06-27-2013, 03:58 AM
tigeravatar Re: Variables declaration 06-27-2013, 10:42 AM
nikolaygeorgiev Re: Variables declaration 06-27-2013, 10:45 AM
tigeravatar Re: Variables declaration 06-27-2013, 10:50 AM
nikolaygeorgiev Re: Variables declaration 06-27-2013, 10:53 AM
tigeravatar Re: Variables declaration 06-27-2013, 11:14 AM
nikolaygeorgiev Re: Variables declaration 06-27-2013, 11:15 AM
  1. #1
    Registered User
    Join Date
    06-25-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    8

    Variables declaration

    Dear friends

    I am quite new to VBA and I am hoping for some help.

    I the code below I notice that the variables are not initialised with the values specified? Could anyone tell my what that is?

    Many thanks

    Option Base 0
    Sub GBM()
    Dim i As Long
    Dim S(10000) As Long
    Dim mu As Integer
    Dim t As Integer
    Dim Sigma As Integer
    mu = 0.1
    t = 1
    Std = 0.2
    S(0) = 100
    For i = 0 To 9999
        S(i + 1) = S(i) * mu * t + Application.NormSDist(Rnd) * Sqr(t) * Sigma
        Range("A1").Offset(i + 1, 1).Value = S(i)
        Next i
    End Sub
    Last edited by Leith Ross; 06-25-2013 at 12:16 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1