Run a web page

stapuff

Well-known Member
Joined
Feb 19, 2004
Messages
1,126
Is there a way to run ( for lack of a better term) a .php webpage then close it when completed?

Thanks,

stapuff
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Might help if I ask the right question:

I have the following code that opens IE, runs a .php file, then closes IE. The question I have is how can I tell if the .php file runs completely before it is closed?

I my case the open, run, close is so fast I can not tell if it actually ran and I do not want to build in anything that will stop the macro to show me it actually is running.



Sub Button1_Click()

Dim IeApp As InternetExplorer
Dim strURL As String
Dim IeDoc As Object
Dim i As Long

Set IeApp = New InternetExplorer
IeApp.Visible = True

strURL = "myURL/time.php"

IeApp.Navigate strURL

Do
Loop Until IeApp.ReadyState = READYSTATE_COMPLETE

Set IeDoc = IeApp.Document

IeApp.Quit

End Sub
 
Upvote 0
The question I have is how can I tell if the .php file runs completely before it is closed?
The standard things I do when developing code are: Step through the code in the VB debugger (F8 etc.); set breakpoints (F9); add Debug.Print statements.

For your web page, you might need to wait until the HTMLDocument is complete, like this:
Code:
While IeApp.Document.ReadyState <> "complete"
    DoEvents
Wend
 
Upvote 0
John - I appreciate the response.

I have already added that code........I was trying to verify the code did not blow through without the website page completing......in order for me to make sure...I am adding a functionality to push data to a test database to verify.

Thanks,

stapuff
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,424
Members
452,914
Latest member
echoix

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top