DEBUG in VBA 7.0 wont step thru code

jfkall

New member
Local time
Today, 18:35
Joined
Apr 20, 2013
Messages
1
have code below when I place cursor on the do line and hit F8 nothing happens. I've compiled the module. Using MS Access 2010. I've opened the trust to include the folder where I am working. Am I missing a reference somewhere? thx

Public Function ab1()
Dim tot, x, y, z As Integer
x = 3
y = 25
z = 0
Do While z < 5
z = z + 1
tot = x * y

Loop
MsgBox "The loop made " & z & " repetitions."
 
have you tried putting a break in the code - your example will take a fraction of a second
 
j,

You're never assigning a value to the function. It just looks like its doing nothing.

ab1 = "Some value you calculate"

Wayne
 

Users who are viewing this thread

Back
Top Bottom