Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DKS DKS is offline
external usenet poster
 
Posts: 103
Default Opening files on the web

Hi,

I have a VB routine to open files available on the web. I have a means to
get the address of the file that interests me, and then I open that url.
However, each time I do that, just before opening the file I get a
pop-question if I would like to open the file - with as possible options OK
or Cancel.

I want to avoid getting this pop-up question, meaning that the file is
ALWAYS opended when I execute my routine. How can I do that?

In case my question did not make sense then here is a sample code, try
running it and you will see that a question on whether to open the file or
not is asked. It is this question that I would like to avoid when I execute
my routine. (Alternately, if there is a means to download and save this file
then I can use that, and once saved I can open the file).

Many thanks in anticipation.

Private Sub OpenURL()
Dim st1 As String
st1 = "http://www.projectservertraining.com/download/vba00.pdf"
ActiveWorkbook.FollowHyperlink st1
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
r r is offline
external usenet poster
 
Posts: 125
Default Opening files on the web

Sub IE_Follow ()
Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")
Const READYSTATE_COMPLETE As Long = 4
Const myURL As String =
"http://www.projectservertraining.com/download/vba00.pdf"
myIE.navigate myURL
myIE.Visible = True
Do While myIE.Busy Or myIE.readyState < READYSTATE_COMPLETE
DoEvents
Loop
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"DKS" wrote:

Hi,

I have a VB routine to open files available on the web. I have a means to
get the address of the file that interests me, and then I open that url.
However, each time I do that, just before opening the file I get a
pop-question if I would like to open the file - with as possible options OK
or Cancel.

I want to avoid getting this pop-up question, meaning that the file is
ALWAYS opended when I execute my routine. How can I do that?

In case my question did not make sense then here is a sample code, try
running it and you will see that a question on whether to open the file or
not is asked. It is this question that I would like to avoid when I execute
my routine. (Alternately, if there is a means to download and save this file
then I can use that, and once saved I can open the file).

Many thanks in anticipation.

Private Sub OpenURL()
Dim st1 As String
st1 = "http://www.projectservertraining.com/download/vba00.pdf"
ActiveWorkbook.FollowHyperlink st1
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
DKS DKS is offline
external usenet poster
 
Posts: 103
Default Opening files on the web

Hi R,

Thanks for this routine. Works fine for pdf file. Nevertheless for .xls
and .doc I am getting similar error, the system asks me to confirm if I want
to open or save or cancel. Any way to get around?

For example: here is an excel file url
http://www.exinfm.com/excel%20files/..._Templates.xls

Many thanks in anticipation.





"r" wrote:

Sub IE_Follow ()
Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")
Const READYSTATE_COMPLETE As Long = 4
Const myURL As String =
"http://www.projectservertraining.com/download/vba00.pdf"
myIE.navigate myURL
myIE.Visible = True
Do While myIE.Busy Or myIE.readyState < READYSTATE_COMPLETE
DoEvents
Loop
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"DKS" wrote:

Hi,

I have a VB routine to open files available on the web. I have a means to
get the address of the file that interests me, and then I open that url.
However, each time I do that, just before opening the file I get a
pop-question if I would like to open the file - with as possible options OK
or Cancel.

I want to avoid getting this pop-up question, meaning that the file is
ALWAYS opended when I execute my routine. How can I do that?

In case my question did not make sense then here is a sample code, try
running it and you will see that a question on whether to open the file or
not is asked. It is this question that I would like to avoid when I execute
my routine. (Alternately, if there is a means to download and save this file
then I can use that, and once saved I can open the file).

Many thanks in anticipation.

Private Sub OpenURL()
Dim st1 As String
st1 = "http://www.projectservertraining.com/download/vba00.pdf"
ActiveWorkbook.FollowHyperlink st1
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
r r is offline
external usenet poster
 
Posts: 125
Default Opening files on the web

Sub IE_Follow()
Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")
Const READYSTATE_COMPLETE As Long = 4
Const myURL As String =
"http://www.exinfm.com/excel%20files/Balanced_Scorecard_Templates.xls"
myIE.navigate myURL
myIE.Visible = True
'Do While myIE.Busy Or myIE.readyState < READYSTATE_COMPLETE
'DoEvents
'Loop
End Sub

Sub open_xls()
Workbooks.Open
"http://www.exinfm.com/excel%20files/Balanced_Scorecard_Templates.xls"
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"DKS" wrote:

Hi R,

Thanks for this routine. Works fine for pdf file. Nevertheless for .xls
and .doc I am getting similar error, the system asks me to confirm if I want
to open or save or cancel. Any way to get around?

For example: here is an excel file url
http://www.exinfm.com/excel%20files/..._Templates.xls

Many thanks in anticipation.





"r" wrote:

Sub IE_Follow ()
Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")
Const READYSTATE_COMPLETE As Long = 4
Const myURL As String =
"http://www.projectservertraining.com/download/vba00.pdf"
myIE.navigate myURL
myIE.Visible = True
Do While myIE.Busy Or myIE.readyState < READYSTATE_COMPLETE
DoEvents
Loop
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"DKS" wrote:

Hi,

I have a VB routine to open files available on the web. I have a means to
get the address of the file that interests me, and then I open that url.
However, each time I do that, just before opening the file I get a
pop-question if I would like to open the file - with as possible options OK
or Cancel.

I want to avoid getting this pop-up question, meaning that the file is
ALWAYS opended when I execute my routine. How can I do that?

In case my question did not make sense then here is a sample code, try
running it and you will see that a question on whether to open the file or
not is asked. It is this question that I would like to avoid when I execute
my routine. (Alternately, if there is a means to download and save this file
then I can use that, and once saved I can open the file).

Many thanks in anticipation.

Private Sub OpenURL()
Dim st1 As String
st1 = "http://www.projectservertraining.com/download/vba00.pdf"
ActiveWorkbook.FollowHyperlink st1
End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Opening files on the web

On 6 Giu, 22:07, DKS wrote:
Hi R,

Thanks for this routine. *Works fine for pdf file. *Nevertheless for ..xls
and .doc I am getting similar error, the system asks me to confirm if I want
to open or save or cancel. *Any way to get around?

For example: here is an excel file urlhttp://www.exinfm.com/excel%20files/Balanced_Scorecard_Templates.xls

Many thanks in anticipation.


Hi all.
If IE is on, try to open file directly;

Public Sub prova()
Workbooks.Open "http://www.exinfm.com/excel%20files/
Balanced_Scorecard_Templates.xls"
End Sub

Regards
Eliano


  #6   Report Post  
Posted to microsoft.public.excel.programming
DKS DKS is offline
external usenet poster
 
Posts: 103
Default Opening files on the web

Thanks R and Eliano.

For my understanding: what do you mean Eliano when you say if IE is on?
Does it mean that i must have at least one IE window open?

"DKS" wrote:

Hi R,

Thanks for this routine. Works fine for pdf file. Nevertheless for .xls
and .doc I am getting similar error, the system asks me to confirm if I want
to open or save or cancel. Any way to get around?

For example: here is an excel file url
http://www.exinfm.com/excel%20files/..._Templates.xls

Many thanks in anticipation.





"r" wrote:

Sub IE_Follow ()
Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")
Const READYSTATE_COMPLETE As Long = 4
Const myURL As String =
"http://www.projectservertraining.com/download/vba00.pdf"
myIE.navigate myURL
myIE.Visible = True
Do While myIE.Busy Or myIE.readyState < READYSTATE_COMPLETE
DoEvents
Loop
End Sub

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"DKS" wrote:

Hi,

I have a VB routine to open files available on the web. I have a means to
get the address of the file that interests me, and then I open that url.
However, each time I do that, just before opening the file I get a
pop-question if I would like to open the file - with as possible options OK
or Cancel.

I want to avoid getting this pop-up question, meaning that the file is
ALWAYS opended when I execute my routine. How can I do that?

In case my question did not make sense then here is a sample code, try
running it and you will see that a question on whether to open the file or
not is asked. It is this question that I would like to avoid when I execute
my routine. (Alternately, if there is a means to download and save this file
then I can use that, and once saved I can open the file).

Many thanks in anticipation.

Private Sub OpenURL()
Dim st1 As String
st1 = "http://www.projectservertraining.com/download/vba00.pdf"
ActiveWorkbook.FollowHyperlink st1
End Sub

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Opening files on the web

On 7 Giu, 01:41, DKS wrote:
Thanks R and Eliano.

For my understanding: what do you mean Eliano when you say if IE is on? *
Does it mean that i must have at least one IE window open?


Hi DKS.
If you are on line you can open the file directly; otherwise you can
use
the "r" solution that first open IE and then open the file.
Try this version that open IE and navigate Google and then open your
file:

Sub IE_Follow() ' by Mr. r
Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")
Const READYSTATE_COMPLETE As Long = 4
Const myURL As String = _
"http://www.exinfm.com/excel%20files/Balanced_Scorecard_Templates.xls"
myIE.navigate "http://www.google.it"
Do While myIE.Busy Or myIE.readyState < READYSTATE_COMPLETE
DoEvents
Loop
Workbooks.Open myURL
End Sub

Regards
Eliano
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening files Chris J Dixon Excel Discussion (Misc queries) 0 September 15th 08 05:36 PM
show most recent files first when opening excel files Anne` Excel Discussion (Misc queries) 5 January 23rd 08 01:54 AM
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 PoundMutt Excel Discussion (Misc queries) 1 June 20th 07 03:50 AM
How can I view files chronologically when opening multiple files Stevilsize Excel Discussion (Misc queries) 3 July 26th 05 12:49 AM
Opening Files Dave[_32_] Excel Programming 2 October 16th 03 06:25 PM


All times are GMT +1. The time now is 06:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"