Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Script After Web Query Refreshes

Status
Not open for further replies.

mac7attack

Technical User
Jan 31, 2004
47
0
0
US
Hello all,

I work at a Help Desk and we are trying to use Excel 2003 to monitor our Blackberry server.
This server using a table on a web page to display pending e-mails and such. I have set up a Web Query in an Excel spreadsheet that refreshes every 3 minutes. My question is it possible to run a VBA script directly after the Web Query is finished updating?
My thoughts on how to do this
- associate the script to the Web Query
- Use a VBA event such as Workbook_Open to run the script after the refresh is complete, something like Upon_refresh
- Use a timed VBA script to refresh and run the script.
but I could not figure out how to do any of the above.

Thanks for your help
Matt
 
Hi,

Check out for setting up a BeforeUpdate and AfterUpdate event in a Class module.

Skip,
[sub]
[glasses] [red]Be Advised![/red] For those this winter, caught in Arctic-like calamity, be consoled...
Many are cold, but few are frozen![tongue][/sub]
 
I did some research within VBA help and found this code snippet.

Private Sub ConnectionApp_SheetPivotTableUpdate(ByVal shOne As Object, Target As PivotTable)

MsgBox "The SheetPivotTable connection has been updated."
End Sub

The question is does what "shOne" and "Target" are make a difference?
 
shOne is a worksheet object.
Target is a PivotTable object.

There will also be some code in a class module that defines and instantiates each of these objects.

look in
Skip,
[sub]
[glasses] [red]Be Advised![/red] For those this winter, caught in Arctic-like calamity, be consoled...
Many are cold, but few are frozen![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top