Consulting

Results 1 to 5 of 5

Thread: Run time error help

  1. #1
    VBAX Newbie
    Joined
    Sep 2016
    Posts
    3
    Location

    Run time error help

    I get this error when I test my code and after debugging this line gets highlighted. I've looked up what the error means but can't seem to figure out how to fix it.

    Screen Shot 2016-09-16 at 7.34.34 PM.jpgScreen Shot 2016-09-16 at 7.34.25 PM.jpg
    Thanks!

  2. #2
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    Write "Option Explicit"

    Dim x1 as double
    Dim x2 as double
    Dim xr as double
    Dim es as double
    Dim n as long

  3. #3
    VBAX Newbie
    Joined
    Sep 2016
    Posts
    3
    Location
    Now it's saying "Compile error:Variable not defined" and highlighting the Sub secant() line

  4. #4
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    declare all variables

    Dim x1 as double
    Dim x2 as double
    Dim xr as double
    Dim es as double
    Dim n as long

  5. #5
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    function procedure

    private function fx(x as double) as double
    	fx=(-x^2)+x+0.75
    end function

Tags for this Thread

Posting Permissions

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