Error - Expected Function or Varible

I am trying to get an object to work. It goes out and gets the directory size. Here the code it have so far. Someone Please help me. This is my first object I have created, I have no idea what the problem is...Thanks

Who is Participating?

The major is:
Insted of lines:
Public spath As Class1
Public dtotal As Class1

you must put those:
Public spath As New Class1
Public dtotal As New Class1
This will sole you the run time error that you got.
The "New" for a object instance in needed, exaclly as you doen with "Collection" object.

The minor problem is that ambiguase declaration of variables:
Public spath As String
Public dtotal As Double
Public Sub DirSize(spath As String, dtotal As Double)

The result is that inside "DirSize" subrutine, the function recognize only the local variable and not the globals.