LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default problems with my class


i'm having a problem with one of my classes. i have 2 methods in my
class(among others):


Code:
--------------------
Property Let IngredientName(Index As Integer, sName As String)
If rgSandwich Is Nothing Then
IngredientName = ""
Else
rgSandwich.Offset(0, Index + 2).Value = sName
End If
End Property
Property Get IngredientName(Index As Integer) As String
If rgSandwich Is Nothing Then
UninitializedError
Else
IngredientName = rgSandwich.Offset(0, Index + 2).Value
End If
End Property
--------------------


and a macro in a module:


Code:
--------------------
Sub Testing()
Dim oSandwich As Sandwich
Dim oSandwiches As New Sandwiches

Set oSandwich = oSandwiches.Add("Testing Sandwich")

With oSandwich
.Name = "Testing Sandwich"
.Size = "Yeah"
' (see below)
End With

End Sub
--------------------


i want to be able to have something like .IngredientName(1) =
"Tomatoes" or .IngredientName(3) = "Sauce" where the "(see below)"
comment is, but i'm not sure on how to structure my properties in order
to do so. does anyone know how i can do this?

thanks ahead of time,
sven


--
medicenpringles


------------------------------------------------------------------------
medicenpringles's Profile: http://www.excelforum.com/member.php...o&userid=16458
View this thread: http://www.excelforum.com/showthread...hreadid=477929

 
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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
Problems Setting properties of class module Andibevan[_4_] Excel Programming 2 October 2nd 05 01:44 PM
Excell VBA - Class Modules problems shao Excel Programming 2 August 4th 04 09:27 AM
Collection Class problems Flemming Dahl Excel Programming 4 February 11th 04 04:41 PM
RaiseEvent from a class contained in a 2nd class collection? Andrew[_16_] Excel Programming 2 January 6th 04 04:22 PM


All times are GMT +1. The time now is 04:03 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"