Welcome To Rte-Bookintrovba - Xls !

You might also like

Download as xls, pdf, or txt
Download as xls, pdf, or txt
You are on page 1of 6

NOTE

This workbook and software are provided for free as part of the e-book:
1D SEDIMENT TRANSPORT MORPHODYNAMICS with applications to RIVER
by Gary Parker.
Neither I nor any university in which I am in the employ accepts responsibility or

Welcome to RTe-bookIntroVBA.xls !

This workbook provides a brief set of notes explaining the use of the program la
that is built into Microsoft Excel 2002.

In order to read the notes, please open the Visual Basic Editor.
To do this, click "Tools" from the main menu bar at the top of this page, and sele
from the drop-down menu.
When the Visual Basic Editor appears, double-click on "Module1" under "FDe-b
window on the left side of the main VBA window.
Upon doing this the notes will appear in the "Code" window on the right side of t
The notes provide only a very elementary survey of VBA, but they should be su
using the programs in this e-book, and writing similar programs.

If your version of Excel is Excel 2000 or higher, it may be impossible to execute


setting to "medium" or "low".
To do this, return to the main "Microsoft Excel" window (not the "Visual Basic Ed
" Security" and select "Medium" or "Low" from the "Security Level" box.
art of the e-book:
ith applications to RIVERS AND TURBIDITY CURRENTS,

accepts responsibility or liability for its use by third parties.

the use of the program language VBA (Visual Basic for Applications)

top of this page, and select "Macro", and then "Visual Basic Editor

"Module1" under "FDe-bookIntroVBA.xls" in the "Project -VBA Project"

dow on the right side of the VBA window.


BA, but they should be sufficient for the purpose of understanding and
similar programs.

be impossible to execute VBA code without changing the "Security"

(not the "Visual Basic Editor" window). Then click on "Tools", "Macro",
the "Security Level" box.
18.665
94.61


Put number here: 3

32.1 -3.05 4
2 -0.89 -1
-5.3 -2 46.3

3.2
0
-21.5
NEWTON-RAPHSON ROOT CALCULATOR

This application calculates the root of the equation to the right:


f ( x)= x
Fill in values in the colored cells.
Constant in equation (>0) l 1
First guess for the solution 32

Click the button to find the root.

Results of the calculation.


Solution x 1.1983
Number if iterations 3 The method of calculation is N
'
f ( x )=1−λe−
f(
x new= x old− '
f (
The code is in Module2 of this
To see it, go to the Visual Bas
− λx
f ( x)= x−1.5+e =0

ethod of calculation is Newton-Raphson successive approximation.


'
( x )=1−λe−λx
f ( x old )
x new= x old− '
f (x old )
de is in Module2 of this workbook.
it, go to the Visual Basic Editor (Tools, Macro, Visual Basic Editor)

You might also like