Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
pass value from combobox on form1 to a label.caption
Hi all,
I want to pass the value that is chosen in a combobox (serving as a lookup) to a second form and put it in a label caption. I have publicly declared (public order as string) the chosen value, but when i activate the second form the variable seems to change to 'nothing'. Anybody got any ideas how to solve this? Thanks in advance. Sybolt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
pass value from combobox on form1 to a label.caption
Hi all,
I want to pass the value that is chosen in a combobox (serving as a lookup) to a second form and put it in a label caption. I have publicly declared (public order as string) the chosen value, but when i activate the second form the variable seems to change to 'nothing'. Anybody got any ideas how to solve this? Thanks in advance. Sybolt You need to make your public variable 'global' in scope so it can be accessed anywhere in your project. I use a standard module named 'm_OpenClose' where I put all startup/shutdown code and declare/define all global variables/constants/declares. In this startup module... Public gsOrder As String ...and in your 1st form... gsOrder = ComboBox1.Text ...so it's available thereafter to your 2nd form. -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
label caption | Excel Programming | |||
label caption | Excel Discussion (Misc queries) | |||
Pass highlighted list variable to caption | Excel Programming | |||
label caption | Excel Programming |