Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How can I link (not embed) to a graphic on the internet in Excel?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How can I link (not embed) to a graphic on the internet in Excel?

On Feb 20, 1:48 pm, Ray Carter
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default How can I link (not embed) to a graphic on the internet in Excel?

ActiveSheet.Pictures.Insert("http://www.google.com/images/logo_sm.gif").Select

--
Tim Williams
Palo Alto, CA


"Ray Carter" wrote in message ...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How can I link (not embed) to a graphic on the internet in Exc

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" wrote in message ...
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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default How can I link (not embed) to a graphic on the internet in Exc

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" wrote in message
...
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" wrote in message
...
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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How can I link (not embed) to a graphic on the internet in Exc

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" wrote in message
...
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" wrote in message
...
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






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default How can I link (not embed) to a graphic on the internet in Exc

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" wrote in message ...
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" wrote in message
...
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" wrote in message
...
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
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
how do I embed/Link pictures onto excel database cells? a0relento Excel Discussion (Misc queries) 0 October 14th 05 05:27 AM
Can I link or embed .pdf files into or to an excel file? GrubbyG Excel Programming 1 October 4th 05 06:05 AM
Can I embed or link multiple .pdf files into or to an excel file? GrubbyG Excel Discussion (Misc queries) 1 October 3rd 05 08:40 PM
Link and embed pdf into excel nielsencj Links and Linking in Excel 0 May 20th 05 07:19 PM
Embed Graphic onto custom command john m Excel Programming 0 April 6th 04 04:25 PM


All times are GMT +1. The time now is 06:24 AM.

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"