Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add custom property to a listbox?

I know I've seen information on how to do this but now can't find it.

I have several textboxs on a userform that I want to link to a cells. I
want the textbox to have a property that points to the cell. I have the
following class:
'############## begin code ################
Option Explicit

Public WithEvents tbLength As MSForms.TextBox
Private rngSource As Range

Property Let rngSource(rngS As Range)
If Not rngS.Address = rngSource.Address Then
rngSource = rngS
tbLength.Text = rngSource.Text
End If
End Property

Property Get rngSource()
rngSource = rngSource
End Property


Private Sub tbLength_Change()
rngSource.Formula = "=" & tbLength.Text
End Sub

'############## end code ################

Now I have two issues, the first being - will this work? and the second
being, how do I add this to my control toolbox?

Any help is appreciated.

Mike


Reply
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
list property of listbox x taol Excel Programming 3 January 20th 06 07:50 PM
Can you link a custom property to an Excel custom header text? LouErc Setting up and Configuration of Excel 0 November 8th 05 04:58 PM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM
ListBox.ColumnHeads Property Kevin Excel Programming 4 July 16th 04 10:55 AM
Listbox text property not working correctly Shawn[_2_] Excel Programming 2 October 2nd 03 02:35 PM


All times are GMT +1. The time now is 12:39 PM.

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

About Us

"It's about Microsoft Excel"