I am working within an Excel workbook that calls internet explorer and directs the workbook user to a log-in page in order to validate them and then retrieve data from our server. I have found that if users have 'Protected Mode' (Internet Options --> Security) enabled in IE they will often get "stuck" on the log-in page after entering their username and password. When 'Protected Mode' is disabled, there is no issue.
I am trying to create a macro that will detect their IE settings and notify the user if protected mode is enabled (and potentially change this setting for them with VBA using the PutProperty
method, if possible). I am currently working with Microsoft Internet Controls reference. The route I have attempted is below (within a subroutine, of course).
Dim objBrowser As InternetExplorer
Dim vProtected As Variant
Set objBrowser = New InternetExplorer
'Opens IE and navigates to log-in page
'The code here works as expected
'No idea what to put in for arguments in GetProperty
vProtected = objBrowser.GetProperty("?")
I am unsure of what data type GetProperty
actually returns (hence the variant) and I do not know what to pass in it for arguments. Additionally, if this is the wrong way entirely to do this I am open to a new course of action.
The MSDN article on the GetProperty method of the InternetExplorer object was less than helpful.
It is worth mentioning I am quite new to Microsoft Internet Controls and the InternetExplorer object, this is the first time I've worked with it.
Thank you for your time and consideration!