D
Dave Neve
Hi
As a lot of code in my book doesn't quite seem to work on my system, (VBA
Word 2002) I've tried sth off a site recommended by the group.
It's to work out the volume of a cylinder.
Private Sub OK_Click( )
r = Val(radius.Text)
h = Val(hght.Text)
pi = 22 / 7
v = pi * (r ^ 2) * h
volume.Text= Str$(v)
End Sub
Problem is that an error appears concerning the value r (non defined
variable).
Why can't I find some simple exercises to create macros which actually run
on my system?
Why is r a non defined variable when I've typed in a value?
I don't think the mistakes are from me as I copy and paste code.
Thanks in advance
As a lot of code in my book doesn't quite seem to work on my system, (VBA
Word 2002) I've tried sth off a site recommended by the group.
It's to work out the volume of a cylinder.
Private Sub OK_Click( )
r = Val(radius.Text)
h = Val(hght.Text)
pi = 22 / 7
v = pi * (r ^ 2) * h
volume.Text= Str$(v)
End Sub
Problem is that an error appears concerning the value r (non defined
variable).
Why can't I find some simple exercises to create macros which actually run
on my system?
Why is r a non defined variable when I've typed in a value?
I don't think the mistakes are from me as I copy and paste code.
Thanks in advance