![]() |
picking a userform to show
I have a userform with listbox which reads in a list from an excel
spreadsheet. When the user selects an item from the list I want to be able to open a second userform, which will vary based on the first selection. In my spreadsheet, the column adjacent to the list that shows in the initial listbox, has the name of the userform i want to bring up. I am able to find this name, because my MsgBox shows it, but how can i get VBA to recognize that string as a userform name. Private Sub LotList_Click() Dim UnitType As String Dim LotIndex As Integer LotIndex = LotList.ListIndex Range("lotnumbers").Offset(LotIndex, 1).Select UnitType = CStr(ActiveCell.Value) UnitType.show 'this is the line that is not working MsgBox UnitType I am pretty new at this, and maybe trying something a little over my head. I hope someone can help me. I appreciate any advice you have to offer. |
picking a userform to show
i got it myself. I found this discussion elsewhe
http://support.microsoft.com/support.../Q213/5/74.ASP XL2000: How to Display a UserForm Whose Name Is in a Variable |
All times are GMT +1. The time now is 01:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com