LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 8
Default Custom class, Stack overflow error

Hi

I have written a class module but when I try to load more than one variable Excel gives me a type 28 error, Google says that it is a memory issue but if it won't even load two strings there must be an error with my code, can someone point out where I have made the mistake please?

My class module is:

Code:
Private pEmpID As String
Private pStartDate As Date
Private pEndDate As Date
Private pStatus As String
Private pHolType As String
Private pShift As String

Public Property Let strEmpID(EmpID As String)
pEmpID = EmpID
End Property

Public Property Get strEmpID() As String
strEmpID = pEmpID
End Property

Public Property Let strStartDate(StartDate As Date)
strStartDate = StartDate
End Property

Public Property Get strStartDate() As Date
pStartDate = strStartDate
End Property

Public Property Let strEndDate(EndDate As Date)
strEndDate = EndDate
End Property

Public Property Get strEndDate() As Date
pEndDate = strEndDate
End Property

Public Property Let strStatus(Status As String)
strStatus = Status
End Property

Public Property Get strStatus() As String
pStatus = strStatus
End Property

Public Property Let strHolType(HolType As String)
strHolType = HolType
End Property

Public Property Get strHolType() As String
pHolType = strHolType
End Property

Public Property Let strShift(Shift As String)
strShift = Shift
End Property

Public Property Get strShift() As String
pShift = strShift
End Property
And my Sub in a normal module is
Code:
Sub Refusetest()
    Dim iHol As clsHoliday
    Set iHol = New clsHoliday
    'With Sheets("MyTime")
        iHol.strEmpID = "EmpID1"
        iHol.strShift = "Shift1"
        'iHol.strStartDate = #1/21/2015#
        'iHol.strEndDate = #1/28/2015#
        'iHol.strHolType = "Type1"
    'End With
    MsgBox iHol.strEmpID
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stack Overflow Steven Excel Programming 1 January 5th 09 05:04 PM
Overflow error, need help mkerstei[_15_] Excel Programming 3 July 14th 06 03:10 AM
Overflow Error DG Excel Discussion (Misc queries) 3 April 15th 05 05:45 PM
Application Run Time Error 1004 and Stack Error ExcelMonkey[_190_] Excel Programming 9 February 11th 05 04:48 PM
Why I get "Stack overflow" err 28 mike Excel Programming 0 July 29th 04 10:24 AM


All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"