Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 15th, 2005, 06:55 AM
Friend of Wrox
Join Date: Dec 2004
Location: London, London, United Kingdom.
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.

Reply With Quote
  #2 (permalink)  
Old April 15th, 2005, 02:36 PM
Friend of Wrox
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
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.).

Reply With Quote
  #3 (permalink)  
Old April 16th, 2005, 06:49 AM
Friend of Wrox
Join Date: Dec 2004
Location: London, London, United Kingdom.
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??!)
Reply With Quote
  #4 (permalink)  
Old April 18th, 2005, 04:14 AM
Friend of Wrox
Join Date: Jun 2003
Location: , , United Kingdom.
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).

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 11:40 AM.

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