Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use VBA to create an IE Browser object using code shown below.
Sometimes the browser comes up minimized and shows flashing in the task bar at the bottom of the screen due to other activities on the screen. I need to have the ie object always visible. Is there a command I can use to make this happen ? Set ie = CreateObject("InternetExplorer.Application") ie.AddressBar = False ie.MenuBar = False ie.Toolbar = False ie.Width = ScreenWidth * 0.55 ' 600 ie.Height = ScreenHeight * 0.98 '750 ie.Left = 0 ie.Top = 0 Thanks, Gary |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You need to add
IE.Visible = True to make the browser visible in the first place. To keep the browser visible within Excel, allowing you to switch between IE and Excel without losing the browser, you need to use the SetParent API call. In the declarations area of your module (above and outside of any procedure), declare the SetParent function. Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, _ ByVal hWndNewParent As Long) As Long Then, in your procedure, use code like IE.Visible = True SetParent IE.Hwnd, Application.Hwnd This will make IE a child window of the Excel application, and IE will float above the worksheet. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "gary" wrote in message ... I use VBA to create an IE Browser object using code shown below. Sometimes the browser comes up minimized and shows flashing in the task bar at the bottom of the screen due to other activities on the screen. I need to have the ie object always visible. Is there a command I can use to make this happen ? Set ie = CreateObject("InternetExplorer.Application") ie.AddressBar = False ie.MenuBar = False ie.Toolbar = False ie.Width = ScreenWidth * 0.55 ' 600 ie.Height = ScreenHeight * 0.98 '750 ie.Left = 0 ie.Top = 0 Thanks, Gary |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Chip,
Your suggestion worked great with one small mod. I had to Add €śPrivate€ť in front of the declare SetParent function so as to not get the €ś..Declare statements not allowed as public members of object modules€ť error. I dont understand what this message is telling me. But your suggest worked great. Many thanks, Gary decalre teh "Chip Pearson" wrote: You need to add IE.Visible = True to make the browser visible in the first place. To keep the browser visible within Excel, allowing you to switch between IE and Excel without losing the browser, you need to use the SetParent API call. In the declarations area of your module (above and outside of any procedure), declare the SetParent function. Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, _ ByVal hWndNewParent As Long) As Long Then, in your procedure, use code like IE.Visible = True SetParent IE.Hwnd, Application.Hwnd This will make IE a child window of the Excel application, and IE will float above the worksheet. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "gary" wrote in message ... I use VBA to create an IE Browser object using code shown below. Sometimes the browser comes up minimized and shows flashing in the task bar at the bottom of the screen due to other activities on the screen. I need to have the ie object always visible. Is there a command I can use to make this happen ? Set ie = CreateObject("InternetExplorer.Application") ie.AddressBar = False ie.MenuBar = False ie.Toolbar = False ie.Width = ScreenWidth * 0.55 ' 600 ie.Height = ScreenHeight * 0.98 '750 ie.Left = 0 ie.Top = 0 Thanks, Gary |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In class modules, Sheet modules, and the ThisWorkbook module,
function declares may not be Public. You must declare them as Private. Just one of the rules of the road. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "gary" wrote in message ... Hi Chip, Your suggestion worked great with one small mod. I had to Add "Private" in front of the declare SetParent function so as to not get the "..Declare statements not allowed as public members of object modules" error. I don't understand what this message is telling me. But your suggest worked great. Many thanks, Gary decalre teh "Chip Pearson" wrote: You need to add IE.Visible = True to make the browser visible in the first place. To keep the browser visible within Excel, allowing you to switch between IE and Excel without losing the browser, you need to use the SetParent API call. In the declarations area of your module (above and outside of any procedure), declare the SetParent function. Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, _ ByVal hWndNewParent As Long) As Long Then, in your procedure, use code like IE.Visible = True SetParent IE.Hwnd, Application.Hwnd This will make IE a child window of the Excel application, and IE will float above the worksheet. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "gary" wrote in message ... I use VBA to create an IE Browser object using code shown below. Sometimes the browser comes up minimized and shows flashing in the task bar at the bottom of the screen due to other activities on the screen. I need to have the ie object always visible. Is there a command I can use to make this happen ? Set ie = CreateObject("InternetExplorer.Application") ie.AddressBar = False ie.MenuBar = False ie.Toolbar = False ie.Width = ScreenWidth * 0.55 ' 600 ie.Height = ScreenHeight * 0.98 '750 ie.Left = 0 ie.Top = 0 Thanks, Gary |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chip,
I noticed that although the IE browser is on top, I can not move it or adjust the scroll bars. If I comment out the €śSetParent IE.Hwnd, Application.Hwnd€ť then I can move the window and adjust the scroll bars. Is it possible to have the browser window on top AND still be able to control the scroll bars and move the window. Hope this makes sense, Gary "Chip Pearson" wrote: In class modules, Sheet modules, and the ThisWorkbook module, function declares may not be Public. You must declare them as Private. Just one of the rules of the road. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "gary" wrote in message ... Hi Chip, Your suggestion worked great with one small mod. I had to Add "Private" in front of the declare SetParent function so as to not get the "..Declare statements not allowed as public members of object modules" error. I don't understand what this message is telling me. But your suggest worked great. Many thanks, Gary decalre teh "Chip Pearson" wrote: You need to add IE.Visible = True to make the browser visible in the first place. To keep the browser visible within Excel, allowing you to switch between IE and Excel without losing the browser, you need to use the SetParent API call. In the declarations area of your module (above and outside of any procedure), declare the SetParent function. Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, _ ByVal hWndNewParent As Long) As Long Then, in your procedure, use code like IE.Visible = True SetParent IE.Hwnd, Application.Hwnd This will make IE a child window of the Excel application, and IE will float above the worksheet. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "gary" wrote in message ... I use VBA to create an IE Browser object using code shown below. Sometimes the browser comes up minimized and shows flashing in the task bar at the bottom of the screen due to other activities on the screen. I need to have the ie object always visible. Is there a command I can use to make this happen ? Set ie = CreateObject("InternetExplorer.Application") ie.AddressBar = False ie.MenuBar = False ie.Toolbar = False ie.Width = ScreenWidth * 0.55 ' 600 ie.Height = ScreenHeight * 0.98 '750 ie.Left = 0 ie.Top = 0 Thanks, Gary |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can't replicate your problem The code I provided works fine in
Excel 2003 and IE 6. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "gary" wrote in message ... Chip, I noticed that although the IE browser is on top, I can not move it or adjust the scroll bars. If I comment out the "SetParent IE.Hwnd, Application.Hwnd" then I can move the window and adjust the scroll bars. Is it possible to have the browser window on top AND still be able to control the scroll bars and move the window. Hope this makes sense, Gary "Chip Pearson" wrote: In class modules, Sheet modules, and the ThisWorkbook module, function declares may not be Public. You must declare them as Private. Just one of the rules of the road. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "gary" wrote in message ... Hi Chip, Your suggestion worked great with one small mod. I had to Add "Private" in front of the declare SetParent function so as to not get the "..Declare statements not allowed as public members of object modules" error. I don't understand what this message is telling me. But your suggest worked great. Many thanks, Gary decalre teh "Chip Pearson" wrote: You need to add IE.Visible = True to make the browser visible in the first place. To keep the browser visible within Excel, allowing you to switch between IE and Excel without losing the browser, you need to use the SetParent API call. In the declarations area of your module (above and outside of any procedure), declare the SetParent function. Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, _ ByVal hWndNewParent As Long) As Long Then, in your procedure, use code like IE.Visible = True SetParent IE.Hwnd, Application.Hwnd This will make IE a child window of the Excel application, and IE will float above the worksheet. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "gary" wrote in message ... I use VBA to create an IE Browser object using code shown below. Sometimes the browser comes up minimized and shows flashing in the task bar at the bottom of the screen due to other activities on the screen. I need to have the ie object always visible. Is there a command I can use to make this happen ? Set ie = CreateObject("InternetExplorer.Application") ie.AddressBar = False ie.MenuBar = False ie.Toolbar = False ie.Width = ScreenWidth * 0.55 ' 600 ie.Height = ScreenHeight * 0.98 '750 ie.Left = 0 ie.Top = 0 Thanks, Gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA and Object Browser Help Missing | Setting up and Configuration of Excel | |||
Object Browser does what? | Excel Programming | |||
Object Browser Help | Excel Programming | |||
Object Browser Help | Excel Programming | |||
VBA Object Browser icons key | Excel Programming |