Hi I have an Embedded Active X Browser (Microsoft WebBrowser Control). Named "Browser1" On Sheet1 of my workbook.
It is working well and I can pull up web pages using it. If in a Macro in Sheet1 I place the command Browser1.Visible = False it hides the Browser. Browser1.Visible = True will then make it visible again.
Once I load a web page in I want to Activate the Browser Window and Select and Copy the text data in the window by using SendKeys (^a^c).
To test this, I have an Active X Button who's macro get placed on Sheet1 when I click on the button while in Design Mode.
I can't seem to find a way of sending the SendKeys command
My Code is
Private Sub SelectAllBrowser_Click()
WebBrowser1.Activate
SendKeys ("^a^c")
End Sub
- When I press my "SelectAllBrowserl" button nothing happens
- I get the same results if I replace SendKeys with Application.SendKeys.
- If I try WebBrowser1.SendKeys I get the Error Message "Object Does Not support this property or method". Application.WebBrowser1.SendKeys gives the same Error Message.
- If I manualy click on the Browser and then press the ^a^c keys it does select and copy all the data.
- I have tried selecting the Browser with the command Browser1.Select and it does select the Browser but differently (it puts small empty circles at the corners of the browser) than if I just manually click on the Embedded Browser, which does not show any visible signs of being selected, but it is. Using the SendKeys in different forms after the Browser1.Select command does not do anything either.
- I believe if I Activate IE and then send the command Application.SendKeys(^a^c) it does SELECT ALL and Then COPY the data on the IE Browser onto the clipboard. Presently I do this with Firfox and it works well. I would like to do this however on the Browser I have Embedded on the worksheet using the Active X "Microsoft WebBrowser" control .
- Any Suggestions on how to SELECT ALL and COPY the Embedded Browser Data to the Clipboard, or Another way of getting the data from the Browser. I only need the Text Data, which I then parse after I Paste Special (text) to another worksheet.
It is working well and I can pull up web pages using it. If in a Macro in Sheet1 I place the command Browser1.Visible = False it hides the Browser. Browser1.Visible = True will then make it visible again.
Once I load a web page in I want to Activate the Browser Window and Select and Copy the text data in the window by using SendKeys (^a^c).
To test this, I have an Active X Button who's macro get placed on Sheet1 when I click on the button while in Design Mode.
I can't seem to find a way of sending the SendKeys command
My Code is
Private Sub SelectAllBrowser_Click()
WebBrowser1.Activate
SendKeys ("^a^c")
End Sub
- When I press my "SelectAllBrowserl" button nothing happens
- I get the same results if I replace SendKeys with Application.SendKeys.
- If I try WebBrowser1.SendKeys I get the Error Message "Object Does Not support this property or method". Application.WebBrowser1.SendKeys gives the same Error Message.
- If I manualy click on the Browser and then press the ^a^c keys it does select and copy all the data.
- I have tried selecting the Browser with the command Browser1.Select and it does select the Browser but differently (it puts small empty circles at the corners of the browser) than if I just manually click on the Embedded Browser, which does not show any visible signs of being selected, but it is. Using the SendKeys in different forms after the Browser1.Select command does not do anything either.
- I believe if I Activate IE and then send the command Application.SendKeys(^a^c) it does SELECT ALL and Then COPY the data on the IE Browser onto the clipboard. Presently I do this with Firfox and it works well. I would like to do this however on the Browser I have Embedded on the worksheet using the Active X "Microsoft WebBrowser" control .
- Any Suggestions on how to SELECT ALL and COPY the Embedded Browser Data to the Clipboard, or Another way of getting the data from the Browser. I only need the Text Data, which I then parse after I Paste Special (text) to another worksheet.
Last edited: