Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 June 2nd, 2006, 12:04 PM
AJD AJD is offline
Registered User
 
Join Date: Jun 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Click a web button using VB code

I’m trying to use the Internet Explorer object in VB. When I navigate this site using this command

oIE.Navigate “https://dss.nyiso.com/dss/docViewAGN...DocType=csv”

I get a box that asked me to click Open, Save, or Cancel.
How do I click the Save button in VB Code?



 
Old June 5th, 2006, 06:27 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What are you trying to do with this code? Do you want to open IE? Do you want to save the page? If so, to where? etc.

mmcdonal
 
Old June 5th, 2006, 06:34 AM
AJD AJD is offline
Registered User
 
Join Date: Jun 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have IE open successfully. The URL is to a site to download csv files. I want to save the csv file locally.

 
Old June 5th, 2006, 06:47 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am not sure about that. I don't know if you can download and save files without some interaction. I would suggest a trip to the Windows Scripting Center: http://msdn.microsoft.com/library/de...scriptinga.asp

mmcdonal
 
Old June 5th, 2006, 07:35 AM
AJD AJD is offline
Registered User
 
Join Date: Jun 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks mmcdonal. I've been doing alot of internet searching for how to do this and haven't found anything yet. I'm wondering if there is a way to use Sendkeys to click the button

 
Old June 6th, 2006, 07:14 AM
AJD AJD is offline
Registered User
 
Join Date: Jun 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've played with this some more and almost have it working. If the dialog box has focus I can use Sendkeys and it works. However, How do I set focus on this dialog box? Once I find this out, I think I have it.

 
Old June 6th, 2006, 07:32 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am not sure how you would give a dialog box focus. Normally you take the button click value and do something with that. Is there a way you can do this without the dialog box?

mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
click event for vb YesNo button mohiddin52 Access VBA 2 January 14th, 2007 02:25 AM
how to use Excel VB to click a button which is!! tappenchris Excel VBA 0 November 30th, 2006 12:07 AM
How to Click a button on a web page in VB code AJD Beginning VB 6 0 June 2nd, 2006 12:08 PM
rebind dataset from web service after click button blur_ivy .NET Web Services 2 April 15th, 2005 09:09 AM
A button to click from vb, on webbrowser object !! mmd VB How-To 2 January 19th, 2004 07:11 AM





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