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 |
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 |
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 |
All times are GMT +1. The time now is 07:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com