Click here to Skip to main content
15,903,854 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Problem instantiating FileSystemWatcher in Windows Service Pin
Member 109911325-Aug-14 2:55
Member 109911325-Aug-14 2:55 
GeneralRe: Problem instantiating FileSystemWatcher in Windows Service Pin
Bernhard Hiller5-Aug-14 20:09
Bernhard Hiller5-Aug-14 20:09 
QuestionRegular Expression in VBS Pin
Member 88781863-Aug-14 19:36
Member 88781863-Aug-14 19:36 
GeneralRe: Regular Expression in VBS Pin
Tim Carmichael4-Aug-14 2:43
Tim Carmichael4-Aug-14 2:43 
QuestionRe: Regular Expression in VBS Pin
ZurdoDev15-Aug-14 8:19
professionalZurdoDev15-Aug-14 8:19 
QuestionProblem setting a value in a textbox from another form Pin
dilkonika2-Aug-14 6:08
dilkonika2-Aug-14 6:08 
AnswerRe: Problem setting a value in a textbox from another form Pin
Richard Andrew x642-Aug-14 16:14
professionalRichard Andrew x642-Aug-14 16:14 
AnswerRe: Problem setting a value in a textbox from another form Pin
kasbaba2-Aug-14 19:57
kasbaba2-Aug-14 19:57 
The problem is because of incorrect referencing.

Consider this:
You are creating an Instance of Form2 as dlg1 and then trying to set value inside Form2 (which isn't loaded). This creates a new instance of Form2 and you see the blank values.

Basically what you are trying to do is to return value from custom designed dialog forms - right !

Try this:
Declare a Public Variable in Form1 to hold Form2 value
VB
Public Form2VAL as string


On Form1 Button Click write:
VB
Dim dlg1 as new Form2
dlg1.showdialog
'Do something with the value
msgbox (Form2Val)
Form2Val = nothing 


On Form2 Button Click write:
VB
Form1.Form2Val = "SomeValue"
Me.close


Similarly for Form3, Declare a Public Variable in Form2 to hold Form3 value
VB
Public Form3VAL as string


On Form2 Button Click write
VB
Dim dlg2 as new Form3
dlg2.showdialog
'Do something with the value
msgbox (Form3Val)
Form3Val = nothing


On Form3 Button Click write:
VB
Form2.Form3Val = "SomeValue"
Me.close

Questionsherdian controls : license not found Pin
zuber ahmed2-Aug-14 1:39
zuber ahmed2-Aug-14 1:39 
AnswerRe: sherdian controls : license not found Pin
Eddy Vluggen2-Aug-14 12:23
professionalEddy Vluggen2-Aug-14 12:23 
QuestionSherdian controls Pin
zuber ahmed1-Aug-14 10:00
zuber ahmed1-Aug-14 10:00 
AnswerRe: Sherdian controls Pin
Mycroft Holmes1-Aug-14 13:43
professionalMycroft Holmes1-Aug-14 13:43 
AnswerRe: Sherdian controls Pin
ZurdoDev15-Aug-14 8:19
professionalZurdoDev15-Aug-14 8:19 
GeneralRe: Sherdian controls Pin
zuber ahmed16-Aug-14 2:11
zuber ahmed16-Aug-14 2:11 
QuestionVBScript Error Code 800A0046 Pin
ChriDo6130-Jul-14 20:57
ChriDo6130-Jul-14 20:57 
AnswerRe: VBScript Error Code 800A0046 Pin
thatraja30-Jul-14 21:37
professionalthatraja30-Jul-14 21:37 
GeneralRe: VBScript Error Code 800A0046 Pin
ChriDo6130-Jul-14 22:16
ChriDo6130-Jul-14 22:16 
QuestionHow to pass selected row from datagrid view into microsoft reports Pin
chronos1329-Jul-14 1:20
chronos1329-Jul-14 1:20 
QuestionGuidance... Pin
Member 1072866725-Jul-14 20:21
Member 1072866725-Jul-14 20:21 
AnswerRe: Guidance... Pin
Member 1072866725-Jul-14 22:11
Member 1072866725-Jul-14 22:11 
GeneralRe: Guidance... Pin
Eddy Vluggen26-Jul-14 10:28
professionalEddy Vluggen26-Jul-14 10:28 
GeneralRe: Guidance... Pin
Mycroft Holmes30-Jul-14 22:56
professionalMycroft Holmes30-Jul-14 22:56 
Questionvb filter Pin
Member 1097008124-Jul-14 19:08
Member 1097008124-Jul-14 19:08 
AnswerRe: vb filter Pin
Karen Mitchelle24-Jul-14 20:05
professionalKaren Mitchelle24-Jul-14 20:05 
JokeRe: vb filter Pin
Richard Deeming25-Jul-14 1:41
mveRichard Deeming25-Jul-14 1:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.