|
-
Apr 13th, 2005, 01:22 PM
#1
Thread Starter
New Member
[Resolved] Passing datas form form
Hi,
I'm really new in VBA World.
I'm user of Reflection form WRQ who has a VBA support inside.
I've created a form with buttons.
The button has to send a command in the terminal.
I'm using this one
VB Code:
Session.Transmit Me.Cmd3.Text & vbCr
But the value CMD3.Text is only sent AFTER I've closed my Form.
I need to send the command as soon as the user click on the button.
Is there a way to do that ?
(PS : Sorry for bad English)
Cedric
Last edited by DecIRC; Apr 14th, 2005 at 09:23 AM.
-
Apr 13th, 2005, 01:36 PM
#2
Re: Passing datas form form
Welcome to the Forums.
Do you have a Cmd3_Click event avaliable to you? If so place your code in that procedure to fire the transmission when clicked.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 13th, 2005, 01:46 PM
#3
Thread Starter
New Member
Re: Passing datas form form
Thanks for the answer, but
My button name is GO3
A text field just near this button is call Cmd3
The routine complete is
VB Code:
Private Sub GO3_Click()
Session.Transmit Me.Cmd3.Text & vbCr
Cmd3.BackColor = &H8000000F
End Sub
If i put Cmd3_Click, my button will become useless, no ?
Cedric
-
Apr 13th, 2005, 01:49 PM
#4
Re: Passing datas form form
Sorry for the mixup. Usually there is a naming convection used to help tell whatt the control type is by its prefix name.
Use your code if GO3 is the button name.
Is the event firing? Place a breakpoint on the Private Sub GO3_Click() line.
VB Code:
Private Sub GO3_Click()
Session.Transmit Me.Cmd3.Text & vbCr
Cmd3.BackColor = &H8000000F
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 13th, 2005, 02:01 PM
#5
Thread Starter
New Member
Re: Passing datas form form
Sorry for not respecting conventions 
The event itself seems to work.
The command in the text field is sent perfectly. But only after the closing of the form. Not directy. The second line works also (but immediately) (the change of color of the form).
-
Apr 13th, 2005, 02:07 PM
#6
Re: Passing datas form form
Ok, looks like the Session.Transmit is the issue so either its designed that way or there is something else to it.
I am not familar with "Reflection form WRQ" app but do you have any documentation on the Session.Transmit?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 13th, 2005, 02:17 PM
#7
Thread Starter
New Member
Re: Passing datas form form
Here is the help page provided
Code:
Syntax object.Transmit String, [Options]
Description
Transmits a string to the host.
Arguments
String Argument Type: String
Required
Specifies the string to transmit.
Options Argument Type: Enumeration
Optional
Specifies additional behavior for the method. You can combine two or more options using addition as shown here:
.Transmit "Hello", rcNoTranslation + rcIgnoreBlockMode
rcNoTranslation
Indicates that the string should not be translated from the PC character set into the host character set.
rcIgnoreBlockMode
Indicates that keyboard text should be transmitted even if Reflection is in block mode. Without this option, transmitted data goes into display memory when Reflection is in block mode.
rcDecodePassword
Use rcDecodePassword to transmit encoded passwords to the host. Passwords are encoded when they are recorded by the Reflection recorder to ensure that they cannot be read in the source code of the recorded procedure. (The recorder records passwords only when SavePasswords is True.) Encoded passwords are also returned by the GetPassword method. Note: This option is ignored if you are transmitting a password that is not encoded.
rcHexData
Indicates that portions of a string that follow a backslash should be interpreted using either hexadecimal code or C-language character conventions. For example, the following statement displays the fraction symbol ¼ (using the decimal code x0BC), followed by a carriage return (using the \r special character).
.Display "\x0BC\r", rcHexData
I've tried with or without the rcIgnoreBlockMode, the result is the same.
and for the object parameter :
Code:
Description
The Session object controls the Reflection session. All of Reflection's methods and properties act on the Session object.
-
Apr 13th, 2005, 02:28 PM
#8
Re: Passing datas form form
Ok, looks like the rcIgnoreBlockMode parameter is what I would have tried too.
How about the Reflection session. Is there something in there that looks like it could set how the transmission is carried out?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 13th, 2005, 02:50 PM
#9
Thread Starter
New Member
Re: Passing datas form form
already looked in the manual, didn't see anything 
I hope it's possible, all the rest of the interface is finished (creation of the content of all the cmdX fields). Just need to parse them to the console....
-
Apr 13th, 2005, 02:53 PM
#10
Re: Passing datas form form
Ok, one last possibility. How are you displaying your user form? Can you post the code?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 13th, 2005, 04:13 PM
#11
Thread Starter
New Member
Re: Passing datas form form
If I remember (I left the office now until tomorrow)
show.smsform
or
smsform.show (not sure anymore)
called from a macro (single line of code in the macro, between Sub and End Sub).
and the macro called from a menu in the application
(smsform is of course the name of my form)
Cedric
-
Apr 13th, 2005, 04:30 PM
#12
Re: Passing datas form form
In Office VBA, the UserForm.Show method's default state is vbModal.
Try changing this to vbModeless. Just a hunch I guess you could call it
VB Code:
UserForm1.Show vbModeless
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 14th, 2005, 09:21 AM
#13
Thread Starter
New Member
Re: Passing datas form form
Damned ! You've saved my life : IT WORKS !!!
-
Apr 14th, 2005, 10:44 AM
#14
Re: [Resolved] Passing datas form form
w00t w00t! I thought that maybe the form was being shown modally (default) and when that happens
it can delay certain messages to/from the form until it is closed. I just was a little unsure since its not a
standard Office VBA app. 
Glad to have helped
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|