Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 15th, 2005, 06:55 AM
Friend of Wrox
Join Date: Dec 2004
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default Establish Com link to Webpage

That's a pretty though one - I want to send and receive variables from VB (in excel) to a designated webpage (PHP) which will return a set of variables to VB -

The first issue is how to send out variables from excel to a webpage ?
1st thought is to call the webpage with the variables in the address like: http:\\www.servername.com\test.php?Var1=$Variable1
That officialy isn't acceptable because $Variable1 could be > 400Kb

Then how to get the webpage PHP to send back to VB

Anyone with a thought or a link for me to start on this - Thanks.

Old April 15th, 2005, 02:36 PM
Friend of Wrox
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

I don't know much about .php processing, but I presume you can manipulate the page prior to its being sent out to the browser.

If so, you can either put the data into a variable in the pages <script> section, or include it as the value of an <input type="hidden" value="put_your_stuff_here">[/size=3].

The return must be done through a form submit, resetting the href of a control that has one (like an inline frame) with the data in a querystring variable (looks like that won't work for you though), etc.—something that submits a Request to the server—then handling things at the server (reading the QueryString value, reading the form element, etc.).

Old April 16th, 2005, 06:49 AM
Friend of Wrox
Join Date: Dec 2004
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts

PHP is basically a program sleeping - as soon as you call the page from the website, the server execute the program within that page.

You can easily transfer variables from one page to another when within a web browser so programs keep on rolling

PHP is time base at the opposite of Java which is event based.
so PHP+Java more or less = VB or C

Perhaps I'm looking at this issue from the wrong angle.. I will re-think the idea (where's the coffee??!)
Old April 18th, 2005, 04:14 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post

You can use the XMLHTTP component inside MSXML to do an HTTP post from Excel to a PHP webpage. The XMLHTTP component can also receive the response back from the PHP page, but you will only be able to send back a string of characters (well, technicaly its actually a binary stream but the point is it wont be "variables"). maybe you could send back your variables as XML?

see http://support.microsoft.com/default.aspx?kbid=290591 for an example (you'll want to use the XMLHTTP component from Excel, not ServerMLHTTP component).


Similar Threads
Thread Thread Starter Forum Replies Last Post
WebPage status cdaye99 VBScript 2 August 7th, 2008 08:57 AM
Webpage template help surendran Classic ASP Basics 2 June 8th, 2007 11:12 AM
LoadFromSqlServer - Can't establish connection mungdrool BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 0 March 8th, 2006 04:08 PM
How to establish a sql server desktop engine pramos.21d SQL Server 2000 0 March 2nd, 2005 09:50 AM
Trying to establish an ID variable tkdk88 Dreamweaver (all versions) 3 January 25th, 2004 07:31 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.