Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I embed/Link pictures onto excel database cells? | Excel Discussion (Misc queries) | |||
Can I link or embed .pdf files into or to an excel file? | Excel Programming | |||
Can I embed or link multiple .pdf files into or to an excel file? | Excel Discussion (Misc queries) | |||
Link and embed pdf into excel | Links and Linking in Excel | |||
Embed Graphic onto custom command | Excel Programming |