ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dialog Boxes (https://www.excelbanter.com/excel-programming/291271-dialog-boxes.html)

Edgar Thoemmes

Dialog Boxes
 
Hi

I have the following code but I cannot seem to add a
ListBox to my DialogBox!

Sub Check_Emails()
Dim Check_Dlg As DialogSheet

Set CurrentSheet = ActiveSheet
Set Check_Dlg = ActiveWorkbook.DialogSheets.Add
Check_Dlg.ListBox.Add

End Sub

Also can any give me any tips on positioning the list box
on the dialogsheet?

TIA

Bob Phillips[_6_]

Dialog Boxes
 
Hi Edgar,

Try this

Check_Dlg.ListBoxes.Add 78, 100, 150, 16.5

change the position values to suit. To load it, use

Check_Dlg.Listboxes(1).AddItem "value1"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Edgar Thoemmes" wrote in message
...
Hi

I have the following code but I cannot seem to add a
ListBox to my DialogBox!

Sub Check_Emails()
Dim Check_Dlg As DialogSheet

Set CurrentSheet = ActiveSheet
Set Check_Dlg = ActiveWorkbook.DialogSheets.Add
Check_Dlg.ListBox.Add

End Sub

Also can any give me any tips on positioning the list box
on the dialogsheet?

TIA





All times are GMT +1. The time now is 10:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com