Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
tried that last code and it seems to return the address of the whole excell
file (c:\folder\epb.xls) rather than the web page address "Atishoo" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I avoid excel change absolute address to relative address | Excel Discussion (Misc queries) | |||
long address list, name-address-city, listed vertically, how do y. | Excel Discussion (Misc queries) | |||
How do I import Office address book to Outlook Express address bo. | Excel Discussion (Misc queries) | |||
How to insert an address from Outlook 2003 address book ? | Excel Programming | |||
LINKING Address cells from an EXCEL spreadsheet to fill MapQuest Address Info | Excel Programming |