Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default url not accessible

I have a macro that imports a text file from a website, it works fine.
However, the macro contains the website where it is being hosted:
http//home.wi.rr.com/myusername/file.txt
My website: http//www.mywebsitename.com is currently hosted on the above
location. If I change the location, now my macro has the wrong url in the
code. When I use the http//www.mywebsitename.com/file.txt it does not access
the file, change to the other address it works fine. Why won't it work? If
I type both addresses in my web browser, I get the same result, why not in
the macro code?

Thank you for your help!
Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default url not accessible

Mike,
I'm no web expert, but server behave differently as to what/how they expect
the sent data to be.
Other difference regarding username/password, cookies etc may be involved.
A full-blown browser may well be handling these aspects for you, under the
hood, in a way that Excel cannot, or is not yet set to do so.

NickHK

"mikeolson" wrote in message
...
I have a macro that imports a text file from a website, it works fine.
However, the macro contains the website where it is being hosted:
http//home.wi.rr.com/myusername/file.txt
My website: http//www.mywebsitename.com is currently hosted on the above
location. If I change the location, now my macro has the wrong url in the
code. When I use the http//www.mywebsitename.com/file.txt it does not

access
the file, change to the other address it works fine. Why won't it work?

If
I type both addresses in my web browser, I get the same result, why not in
the macro code?

Thank you for your help!
Mike



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default url not accessible

I have tried it with just the website. Here are the to actual websites
involved:
the file I am after for the update is:
http//home.wi.rr.com/theolsons4/update.txt
http//www.dealerfinancesolutions.com/update.txt
the home.wi works great in the code, the other does not

Thanks!

Mike

"Don Guillett" wrote:

Hard to tell without testing the actual but
Have you tried it with just the website?

--
Don Guillett
SalesAid Software

"mikeolson" wrote in message
...
I have a macro that imports a text file from a website, it works fine.
However, the macro contains the website where it is being hosted:
http//home.wi.rr.com/myusername/file.txt
My website: http//www.mywebsitename.com is currently hosted on the above
location. If I change the location, now my macro has the wrong url in the
code. When I use the http//www.mywebsitename.com/file.txt it does not
access
the file, change to the other address it works fine. Why won't it work?
If
I type both addresses in my web browser, I get the same result, why not in
the macro code?

Thank you for your help!
Mike




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default url not accessible

Mike,
If I first go to "http//www.dealerfinancesolutions.com", I get a "site under
construction. Then add the "update.txt" to the URL, I get the text file.
So, maybe something in the way the site is set up ?

NickHK

"mikeolson" wrote in message
...
I have tried it with just the website. Here are the to actual websites
involved:
the file I am after for the update is:
http//home.wi.rr.com/theolsons4/update.txt
http//www.dealerfinancesolutions.com/update.txt
the home.wi works great in the code, the other does not

Thanks!

Mike

"Don Guillett" wrote:

Hard to tell without testing the actual but
Have you tried it with just the website?

--
Don Guillett
SalesAid Software

"mikeolson" wrote in message
...
I have a macro that imports a text file from a website, it works fine.
However, the macro contains the website where it is being hosted:
http//home.wi.rr.com/myusername/file.txt
My website: http//www.mywebsitename.com is currently hosted on the

above
location. If I change the location, now my macro has the wrong url in

the
code. When I use the http//www.mywebsitename.com/file.txt it does not
access
the file, change to the other address it works fine. Why won't it

work?
If
I type both addresses in my web browser, I get the same result, why

not in
the macro code?

Thank you for your help!
Mike








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default url not accessible

the "site under construction" is a pubished blank page, when the update.txt
is added it works fine if I use the home.wi.rr.com/theolsons4/update.txt but
not when www.dealerfinancesolutions.com/update.txt is used in my macro. Any
suggestions?

Mike

"NickHK" wrote:

Mike,
If I first go to "http//www.dealerfinancesolutions.com", I get a "site under
construction. Then add the "update.txt" to the URL, I get the text file.
So, maybe something in the way the site is set up ?

NickHK

"mikeolson" wrote in message
...
I have tried it with just the website. Here are the to actual websites
involved:
the file I am after for the update is:
http//home.wi.rr.com/theolsons4/update.txt
http//www.dealerfinancesolutions.com/update.txt
the home.wi works great in the code, the other does not

Thanks!

Mike

"Don Guillett" wrote:

Hard to tell without testing the actual but
Have you tried it with just the website?

--
Don Guillett
SalesAid Software

"mikeolson" wrote in message
...
I have a macro that imports a text file from a website, it works fine.
However, the macro contains the website where it is being hosted:
http//home.wi.rr.com/myusername/file.txt
My website: http//www.mywebsitename.com is currently hosted on the

above
location. If I change the location, now my macro has the wrong url in

the
code. When I use the http//www.mywebsitename.com/file.txt it does not
access
the file, change to the other address it works fine. Why won't it

work?
If
I type both addresses in my web browser, I get the same result, why

not in
the macro code?

Thank you for your help!
Mike






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default url not accessible

Mike,
If you record a macro whilst do a web query to
www.dealerfinancesolutions.com/update.txt, you will see that the actual URL
recorded points to home.wi.rr.com/theolsons4/update.txt.
As such, it seems that Excel cannot use your desired URL, possibly due to
redirection and/or the way the site is set up. But that's conjecture on my
part.

If you force a web query with www.dealerfinancesolutions.com/update.txt, I
get this text string returned:
"dealerfinancesolutions.com;http://home.wi.rr.com/theolsons4/;//update.txt"

I suppose you could parse that string, extract the "real" URL and use that
in a secondary web query.
Or set a reference to "Microsoft WinHTTP Services" and get the real URL
yourself:

Dim WithEvents HTTPStuff As WinHttpRequest

Private Sub CommandButton1_Click()

Set HTTPStuff = New WinHttpRequest

With HTTPStuff
.Open "GET", "http://www.dealerfinancesolutions.com/update.txt"
.Send
End With
End Sub

Private Sub HTTPStuff_OnResponseFinished()
MsgBox HTTPStuff.ResponseText
End Sub

Or maybe other components over which you have more control. e.g. Automating
IE

By the way, it looks like you txt file has a lot of extraneous Tab after the
data.

NickHK

"mikeolson" wrote in message
...
the "site under construction" is a pubished blank page, when the

update.txt
is added it works fine if I use the home.wi.rr.com/theolsons4/update.txt

but
not when www.dealerfinancesolutions.com/update.txt is used in my macro.

Any
suggestions?

Mike

"NickHK" wrote:

Mike,
If I first go to "http//www.dealerfinancesolutions.com", I get a "site

under
construction. Then add the "update.txt" to the URL, I get the text file.
So, maybe something in the way the site is set up ?

NickHK

"mikeolson" wrote in message
...
I have tried it with just the website. Here are the to actual

websites
involved:
the file I am after for the update is:
http//home.wi.rr.com/theolsons4/update.txt
http//www.dealerfinancesolutions.com/update.txt
the home.wi works great in the code, the other does not

Thanks!

Mike

"Don Guillett" wrote:

Hard to tell without testing the actual but
Have you tried it with just the website?

--
Don Guillett
SalesAid Software

"mikeolson" wrote in message
...
I have a macro that imports a text file from a website, it works

fine.
However, the macro contains the website where it is being hosted:
http//home.wi.rr.com/myusername/file.txt
My website: http//www.mywebsitename.com is currently hosted on

the
above
location. If I change the location, now my macro has the wrong

url in
the
code. When I use the http//www.mywebsitename.com/file.txt it does

not
access
the file, change to the other address it works fine. Why won't it

work?
If
I type both addresses in my web browser, I get the same result,

why
not in
the macro code?

Thank you for your help!
Mike








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
Why Would Add-In Modules Not Be Accessible? Edwin Kelly Excel Discussion (Misc queries) 2 June 23rd 09 06:11 PM
Columns not accessible JayDee Excel Worksheet Functions 3 December 15th 08 09:42 PM
publicly accessible spreadsheet? nightcrawler.36 Excel Discussion (Misc queries) 2 July 28th 06 04:19 PM
Is folder accessible? quartz[_2_] Excel Programming 1 September 21st 05 01:11 PM
The folder"name" isn't accessible AMM Excel Discussion (Misc queries) 5 March 3rd 05 11:01 PM


All times are GMT +1. The time now is 08:00 PM.

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

About Us

"It's about Microsoft Excel"