Thread: Class module
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Class module

Did you do Insert = Class Module and put your code there?

--

Regards,
Tom Ogilvy

"David" wrote in message
...
hi guys,
Using "Excel 2002 VBA" book. This is the first instance
of creating a Class Module and I don't see how it is
created as a Class Module. After typing the code, I do
know how to save it as a "Class Module". Must be missing
something very basic here. Code is simple:

Option Explicit
Public Name As String
Public HoursPerWeek As Double
Public rate As Double

Public Function WeeklyPay() As Double
WeeklyPay = HoursPerWeek * rate
End Function

I have done some before, but have not created "Class
Modules"

Thanks