Ver Mensaje Individual
  #4 (permalink)  
Antiguo 03/10/2006, 01:08
Avatar de SuperPinwi
SuperPinwi
 
Fecha de Ingreso: septiembre-2005
Mensajes: 317
Antigüedad: 19 años, 6 meses
Puntos: 1
He comprobado que efectivamente se trata por ser de tipo Shared...

ahora bien, si quiero utilizar propiedades para acceder a las variables, cómo podría hacerlo??

por ejemplo, esta es mi propiedad:
Código:
    Public Shared Property manejaLabel(ByVal val, ByVal etiquetas, ByVal nLabel) As String
        Get
            Return etiquetas(nLabel).Text
         End Get
        Set(ByVal Value As String)
            etiquetas(nLabel).Text = val
        End Set
    End Property
Antes creaba un array de etiquetas así:

Código:
Dim etiquetas(8) As Label
        etiquetas(0) = Label1
        ...
        etiquetas(7) = Label8
ahora supongo que debería asignar valores a las etiquetas así
Código:
manejaLabel1("Hola", i, etiquetas)
pero da este error Debe asignarse un acceso de propiedad a la propiedad o utilizar su valor

también he probado a hacer lo siguiente

Código:
manejaLabel("Hola", etiquetas, i) = "Hola"
pero así me da un error al ejecutarlo "Object variable or with block variable not set"

tenéis alguna pista de cómo solucionar estos errores? o alguna otra forma de resolverlo?

Resuelto

Última edición por SuperPinwi; 05/10/2006 a las 06:55