PC Review


Reply
Thread Tools Rate Thread

How can I link (not embed) to a graphic on the internet in Excel?

 
 
=?Utf-8?B?UmF5IENhcnRlcg==?=
Guest
Posts: n/a
 
      20th Feb 2007
I am wanting to use a graphic (online image) in my worksheet, or is there a
way to test for internet access in excel. Either way what I want to do is
have an 'Online' graphic display if they are connected to the internet.

My original thinking was to post the graphic on my website and simply pull
it in and display it when they were connected. Can't figure that out
either....

If someone has a relatively easy way to do this could you please help.

Thanks in advance
Ray
 
Reply With Quote
 
 
 
 
Leith Ross
Guest
Posts: n/a
 
      20th Feb 2007
On Feb 20, 1:48 pm, Ray Carter <RayCar...@discussions.microsoft.com>
wrote:
> I am wanting to use a graphic (online image) in my worksheet, or is there a
> way to test for internet access in excel. Either way what I want to do is
> have an 'Online' graphic display if they are connected to the internet.
>
> My original thinking was to post the graphic on my website and simply pull
> it in and display it when they were connected. Can't figure that out
> either....
>
> If someone has a relatively easy way to do this could you please help.
>
> Thanks in advance
> Ray



Hello Ray,

I can help answer part of your question, how to determine if the user
is connected. As simple as this seems it ought to be it isn't. This
quote of Allen Weng of Microsoft sums the problem up:

"Actually, there is no single function for determining if a machine is
connected to the Internet, and it is impossible to reliably determine
what is happening without side effects - such as automatic network
connections taking place. What you can do is reliably detect when
there definitely isn't an Internet Link: in the absence of any dial up
or LAN connection the system is definitely off line."

Here is a link that explains more about detection problems associated
with different system setups...
http://www.ndis.com/faq/QA05040101.htm

Here is macro that works well in most cases.
Macro Code:

'Note: WinINet dial-up functions do not support double-dial
connections,
'SmartCard authentication, or connections that require registry-based
certification.
'For more information connection states go to http://www.ndis.com/faq/QA05040101.htm

'Flags for GetInternetState, these are returned
Public Const INTERNET_CONNECTION_MODEM As Long = &H1
Public Const INTERNET_CONNECTION_LAN As Long = &H2
Public Const INTERNET_CONNECTION_PROXY As Long = &H4
Public Const INTERNET_CONNECTION_MODEM_BUSY As Long = &H8
Public Const INTERNET_RAS_INSTALLED As Long = &H10
Public Const INTERNET_CONNECTION_OFFLINE As Long = &H20
Public Const INTERNET_CONNECTION_CONFIGURED As Long = &H40

Public Declare Function GetInternetState _
Lib "Wininet.dll" _
Alias "InternetGetConnectedState" _
(ByVal lpdwFlags As Long, _
ByVal Reserved As Long) As Long

Public Declare Function AttemptToConnect _
Lib "Wininet.dll" _
Alias "InternetAttemptConnect" _
(ByVal Reserved As Long) As Long

Public Declare Function GoOnline _
Lib "Wininet.dll" _
Alias "InternetGoOnlineA" _
(ByVal lpszURL As String, _
ByVal hwndParent As Long, _
ByVal Reserved As Long) As Long

Public Function IsComputerOnline() As Boolean

Dim Flags As Long
Dim Ret

Ret = GetInternetState(Flags, 0&)
IsComputerOnline = Ret And Not (Flags And
INTERNET_CONNECTION_OFFLINE)

End Function

Sincerely,
Leith Ross

 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      20th Feb 2007
ActiveSheet.Pictures.Insert("http://www.google.com/images/logo_sm.gif").Select

--
Tim Williams
Palo Alto, CA


"Ray Carter" <(E-Mail Removed)> wrote in message news:A9ACD7ED-AA59-45DD-A501-(E-Mail Removed)...
> I am wanting to use a graphic (online image) in my worksheet, or is there a
> way to test for internet access in excel. Either way what I want to do is
> have an 'Online' graphic display if they are connected to the internet.
>
> My original thinking was to post the graphic on my website and simply pull
> it in and display it when they were connected. Can't figure that out
> either....
>
> If someone has a relatively easy way to do this could you please help.
>
> Thanks in advance
> Ray



 
Reply With Quote
 
=?Utf-8?B?UmF5IENhcnRlcg==?=
Guest
Posts: n/a
 
      21st Feb 2007
Tim,
Thanks, That works great... However how can I place the graphic in a
specific location, or cell:
For example: I would like the graphic to be displayed in cell H3, right
justified.

the graphic seems to want to be center justified
any thoughts?



"Tim Williams" wrote:

> ActiveSheet.Pictures.Insert("http://www.google.com/images/logo_sm.gif").Select
>
> --
> Tim Williams
> Palo Alto, CA
>
>
> "Ray Carter" <(E-Mail Removed)> wrote in message news:A9ACD7ED-AA59-45DD-A501-(E-Mail Removed)...
> > I am wanting to use a graphic (online image) in my worksheet, or is there a
> > way to test for internet access in excel. Either way what I want to do is
> > have an 'Online' graphic display if they are connected to the internet.
> >
> > My original thinking was to post the graphic on my website and simply pull
> > it in and display it when they were connected. Can't figure that out
> > either....
> >
> > If someone has a relatively easy way to do this could you please help.
> >
> > Thanks in advance
> > Ray

>
>
>

 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      21st Feb 2007
Try this:

'**********
With ActiveSheet.Pictures.Insert("http://www.google.com/images/logo_sm.gif")
.Top = Range("H3").Top
.Left = Range("H3").Left + Range("H3").Width - .Width
End With
'**********

Tim


"Ray Carter" <(E-Mail Removed)> wrote in message
news:02EC9CFA-8596-471E-B822-(E-Mail Removed)...
> Tim,
> Thanks, That works great... However how can I place the graphic in a
> specific location, or cell:
> For example: I would like the graphic to be displayed in cell H3, right
> justified.
>
> the graphic seems to want to be center justified
> any thoughts?
>
>
>
> "Tim Williams" wrote:
>
>>
>> ActiveSheet.Pictures.Insert("http://www.google.com/images/logo_sm.gif").Select
>>
>> --
>> Tim Williams
>> Palo Alto, CA
>>
>>
>> "Ray Carter" <(E-Mail Removed)> wrote in message
>> news:A9ACD7ED-AA59-45DD-A501-(E-Mail Removed)...
>> > I am wanting to use a graphic (online image) in my worksheet, or is
>> > there a
>> > way to test for internet access in excel. Either way what I want to do
>> > is
>> > have an 'Online' graphic display if they are connected to the internet.
>> >
>> > My original thinking was to post the graphic on my website and simply
>> > pull
>> > it in and display it when they were connected. Can't figure that out
>> > either....
>> >
>> > If someone has a relatively easy way to do this could you please help.
>> >
>> > Thanks in advance
>> > Ray

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?UmF5IENhcnRlcg==?=
Guest
Posts: n/a
 
      21st Feb 2007
Tim, That works great. When I am want to delete the image how is that done?
I am wanting to delete the image each time I leave the page. Any Ideas?

"Tim Williams" wrote:

> Try this:
>
> '**********
> With ActiveSheet.Pictures.Insert("http://www.google.com/images/logo_sm.gif")
> .Top = Range("H3").Top
> .Left = Range("H3").Left + Range("H3").Width - .Width
> End With
> '**********
>
> Tim
>
>
> "Ray Carter" <(E-Mail Removed)> wrote in message
> news:02EC9CFA-8596-471E-B822-(E-Mail Removed)...
> > Tim,
> > Thanks, That works great... However how can I place the graphic in a
> > specific location, or cell:
> > For example: I would like the graphic to be displayed in cell H3, right
> > justified.
> >
> > the graphic seems to want to be center justified
> > any thoughts?
> >
> >
> >
> > "Tim Williams" wrote:
> >
> >>
> >> ActiveSheet.Pictures.Insert("http://www.google.com/images/logo_sm.gif").Select
> >>
> >> --
> >> Tim Williams
> >> Palo Alto, CA
> >>
> >>
> >> "Ray Carter" <(E-Mail Removed)> wrote in message
> >> news:A9ACD7ED-AA59-45DD-A501-(E-Mail Removed)...
> >> > I am wanting to use a graphic (online image) in my worksheet, or is
> >> > there a
> >> > way to test for internet access in excel. Either way what I want to do
> >> > is
> >> > have an 'Online' graphic display if they are connected to the internet.
> >> >
> >> > My original thinking was to post the graphic on my website and simply
> >> > pull
> >> > it in and display it when they were connected. Can't figure that out
> >> > either....
> >> >
> >> > If someone has a relatively easy way to do this could you please help.
> >> >
> >> > Thanks in advance
> >> > Ray
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      21st Feb 2007
Either of these:

Store a reference to the image in a global variable
Rename the image with a fixed name

both of these would allow you to reference and delete the image later.

--
Tim Williams
Palo Alto, CA


"Ray Carter" <(E-Mail Removed)> wrote in message news:713642A7-FDC4-4DF2-99EE-(E-Mail Removed)...
> Tim, That works great. When I am want to delete the image how is that done?
> I am wanting to delete the image each time I leave the page. Any Ideas?
>
> "Tim Williams" wrote:
>
> > Try this:
> >
> > '**********
> > With ActiveSheet.Pictures.Insert("http://www.google.com/images/logo_sm.gif")
> > .Top = Range("H3").Top
> > .Left = Range("H3").Left + Range("H3").Width - .Width
> > End With
> > '**********
> >
> > Tim
> >
> >
> > "Ray Carter" <(E-Mail Removed)> wrote in message
> > news:02EC9CFA-8596-471E-B822-(E-Mail Removed)...
> > > Tim,
> > > Thanks, That works great... However how can I place the graphic in a
> > > specific location, or cell:
> > > For example: I would like the graphic to be displayed in cell H3, right
> > > justified.
> > >
> > > the graphic seems to want to be center justified
> > > any thoughts?
> > >
> > >
> > >
> > > "Tim Williams" wrote:
> > >
> > >>
> > >> ActiveSheet.Pictures.Insert("http://www.google.com/images/logo_sm.gif").Select
> > >>
> > >> --
> > >> Tim Williams
> > >> Palo Alto, CA
> > >>
> > >>
> > >> "Ray Carter" <(E-Mail Removed)> wrote in message
> > >> news:A9ACD7ED-AA59-45DD-A501-(E-Mail Removed)...
> > >> > I am wanting to use a graphic (online image) in my worksheet, or is
> > >> > there a
> > >> > way to test for internet access in excel. Either way what I want to do
> > >> > is
> > >> > have an 'Online' graphic display if they are connected to the internet.
> > >> >
> > >> > My original thinking was to post the graphic on my website and simply
> > >> > pull
> > >> > it in and display it when they were connected. Can't figure that out
> > >> > either....
> > >> >
> > >> > If someone has a relatively easy way to do this could you please help.
> > >> >
> > >> > Thanks in advance
> > >> > Ray
> > >>
> > >>
> > >>

> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel link to Powerpoint.. Can you link a graphic? Ed Microsoft Powerpoint 0 20th Apr 2009 03:03 AM
Excel link to Powerpoint.. Can you link a graphic? Ed Microsoft Excel Discussion 0 20th Apr 2009 03:03 AM
how to embed a link in a graphic =?Utf-8?B?amNlYWdsZQ==?= Microsoft Frontpage 2 28th May 2006 01:59 PM
Link or embed excel data? =?Utf-8?B?bWFnZ2llbHlubg==?= Microsoft Word Document Management 0 6th Oct 2005 04:17 PM
Can I link or embed .pdf files into or to an excel file? =?Utf-8?B?R3J1YmJ5Rw==?= Microsoft Excel Programming 1 4th Oct 2005 06:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:58 PM.