Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default adding a listbox to a spreadsheet

hi,

Does anyone have any code sample on how you would add/populate a
listbox in a spreadsheet?

thx
-Philip
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default adding a listbox to a spreadsheet

Sub TesterAAA3()
Dim rng As Range
Set rng = ActiveSheet.Range("B9:C15")
With ActiveSheet.OLEObjects.Add( _
ClassType:="Forms.ListBox.1", _
Link:=False, _
DisplayAsIcon:=False, _
Left:=rng.Left, _
Top:=rng.Top, _
Width:=rng.Width, _
Height:=rng.Height)
.ListFillRange = "Sheet3!A1:A20"
End With

End Sub

--
Regards,
Tom Ogilvy



wrote in message
om...
hi,

Does anyone have any code sample on how you would add/populate a
listbox in a spreadsheet?

thx
-Philip



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default adding a listbox to a spreadsheet

"Tom Ogilvy" wrote in message ...
Sub TesterAAA3()
Dim rng As Range
Set rng = ActiveSheet.Range("B9:C15")
With ActiveSheet.OLEObjects.Add( _
ClassType:="Forms.ListBox.1", _
Link:=False, _
DisplayAsIcon:=False, _
Left:=rng.Left, _
Top:=rng.Top, _
Width:=rng.Width, _
Height:=rng.Height)
.ListFillRange = "Sheet3!A1:A20"
End With

End Sub

--
Regards,
Tom Ogilvy



wrote in message
om...
hi,

Does anyone have any code sample on how you would add/populate a
listbox in a spreadsheet?

thx
-Philip


thanks that gave me a start
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
Adding item in listbox volabos Excel Worksheet Functions 0 December 3rd 07 11:47 AM
Adding item in listbox volabos Excel Worksheet Functions 0 December 3rd 07 11:27 AM
Adding items to columns in a listbox Daniel Bonallack Excel Discussion (Misc queries) 1 May 7th 07 04:45 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
Adding a row of data to a Listbox Scott Elrod[_2_] Excel Programming 0 August 27th 03 09:43 PM


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