Thread: web box address
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Atishoo Atishoo is offline
external usenet poster
 
Posts: 267
Default web box address

Is there no way to just return the web address in a cell?? i know how to set
the web address using navigate2! surely there must be a way to return the
address just as you would an objects value? then again maybe there isnt?

"Joel" wrote:

this will work. I'm not sure how to direrctly get the combox from the
command bar because it doesn't have a name. It is item 10 in my workbook but
not sure if that will always be the same item. You can also get all the web
addresses from the combobox if you need them.


Set WebBar = Application.CommandBars("Web").Controls
For Each Item In WebBar
If Item.Type = msoControlComboBox Then
webaddress = Item.Text
End If

Next Item

"Atishoo" wrote:

sorry i should have been more specific!
i meant the web address that the web box is currently viewing.

"Joel" wrote:

You have a few problems with the code below

1) A shape doesn't have an address. the location of the shape is determined
by 4 parameters which are points (or pixels) position.

left, top, width, height

2) If you have an Oleobject like a textbox, listbox, checkbox they have both
shape information and object information. The data inside the items will be
the Oleobjects.object while the picture type information will be shapes.

ActiveSheet.Oleobjects("WebBrowser2").object.Text - if item was a textbox

"Atishoo" wrote:

Hi how do I return a web browser address into a cell as per the following
example??


Cells(ActiveCell.Row, "ar").Value = ActiveSheet.Shapes("WebBrowser2").Address