Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Marcotte A" wrote in message
... 1) Can you have multiple userforms in memory at the same time? Yes If so, can variables defined or by one form be passed to another (without a global variable). eg. I will have one form for the user to select a store; then the next form would have them enter sales data for that store. You can either access a variable in the calling form from the called form or vice cersa. In each case, the variable should be declared as a Public variable within that form For instnace in useform1 Userform2.StoreName = Textbox1.Text in userform2 Public StoreName As String Private Sub Userform_Initialize() Me.Textbox1.Text = StoreName End Sub 2) What is a good way to organize code for forms? I understand that each form has its own "module", but can code in these call functions and subs from other userforms or other modules? Yes, but you need to preceede it with the class name, for instance Userform2.Macro_To_Do_something 3) Since each store is exactly the same, can I use a tabstrip? How does VBA differentiate between the tabs? Like this? Private Sub TabStrip1_Change() Dim myTab as string select case tabstrip1.value case 0: myTab = "Sheet1" case 1: myTab = "Sheet2" End Select With ThisWorkbook.Worksheets(myTab) 'code to input data End With End Sub Not sure what you are tring to do. IF you just want to select which sheet, radio buttons would be better than tabstrips. 4) What is a good site or book that discusses userforms? I've read the MS article ("Lesson 11" I think) but am looking for a little bit more than that. Pass. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
user forms | Excel Discussion (Misc queries) | |||
Using multiple user forms to perform Calculations | Excel Programming | |||
VB user forms | Excel Programming | |||
User Forms | Excel Programming | |||
User forms in VBA | Excel Programming |