cloverdog (TechnicalUser) (OP)
30 Mar 10 9:30
Hello. I am new to classes and have not used bookmarks much but I have use for saving a bookmark and a string to a 2D array, used as a ring buffer. I have the code working in some forms but use it so much it would easier if I could develop it into a class.
The problem I face is that in the class version I want to pass a bookmark and a string to the class as elements of a 2D array. A form can then store and later retrieve these details from the class as required.
Works great in the form version, which does not use a class to manage the ring buffer, but I cannot get the bookmark and string to be accepted by the class version when passing them over from the form.
The property Let is as follows:
Public Property Let SaveToRingBuffer(inBookmark As BOOKMARK, inStrCustName As String)
SaveBookmarkToRingBuffer inBookmark, inStrCustName
I am trying to pass these to the class with the following line of code in the form addressing the class:
clsRingBuff.SaveToRingBuffer Me.BOOKMARK, "FredSmith"
I face 2 problems first the intellisense only shows the first parameter (ie BOOKMARK).
Secondly if I rmove the second string to get the bookmark working I get an "invalid use of property" error.
I am instantiating the class in the FormOpen subroutine with
Set clsRingBuff = New clsRingBuffer
The declaration of the class is at the top of the form as:
Private clsRingBuff As clsRingBuffer
Any help would be greatly appreciated.