LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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.

 
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
Some comments stay hidden even after picking show/hide all why? stevepowell Excel Discussion (Misc queries) 2 July 13th 09 08:37 PM
Picking a cell to show in another page. STARFINANCIALGROUP Excel Discussion (Misc queries) 2 January 28th 06 11:26 PM
How to Show a userform from XLA sub Thibault Excel Programming 1 December 8th 03 03:36 PM
show a userform Joe[_17_] Excel Programming 0 July 18th 03 03:25 PM


All times are GMT +1. The time now is 08:10 PM.

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

About Us

"It's about Microsoft Excel"