GooberBoy3017
Programmer
Hi all, first post for an old scientist with minor knowledge of computer programming; I may not use the correct terminology but have tried to explain procedures and my problem as best I can.
Our research institute is in the process of upgrading from Win7 to Win10 Enterprise. We use a digital data logging software (Labchart V7 by Adintruments) for which we have developed custom MACROS, based upon VBscript. The manufacturer cannot provide further support as we are using the MACROS well beyond what was intended for the program. Essentially, the VBscript MACROS call a document (HTML page from IE) to enable the user to either: (1) enter data which then writes back to a spreadsheet within the Labchart program (I call this a "one layer" MACRO, or (2) prompts the user for a selection, which then calls another VBscript MACRO for the user to enter data and write back to Labchart (I call this a "secondary or tiered" MACRO. This strategy was chosen to minimize the number of "buttons" on the GUI. An example would be "Blood Test" MACRO. When this is selected by user, a HTML page opens with a list of buttons to select for each of the types of blood tests.
The problem is with the "tiered" MACROS. They work in Win7 with a standard user logged in- it was necessary for our IS folks to modify IE security settings related to ActiveX and scriptlets to get things to work. On Windows 10, despite having the same IE security settings, I can only get the "tiered": MACROS to work is the Labchart program is run as administrator; "one layer" MACROS work fine for standard user. Our IS folks are hesitant to provide admin access to the various users in our team just to be able to make the program function in Win10.
Some additional information which may be useful. Upon starting the Labchart program, we run an initialize MACRO which sets up a folder in the users\public for the various HTML files which the lab chart program calls when running a MACRO. I have tried another local folder on computer and opened up access for that folder but no luck; thought it may have to do with Win10 read/write access to folder.
An example of a tiered MACRO is below. In Win10, when a button is selected, the secondary HTML page does not appear (nothing happens). I have checked that the docs are located in the directory; again, this works for Win7.Based upon my testing (and limited knowledge) I wonder if there is a Win10 or IE security setting which I cannot change to make MACROS function for standard user.
I am hoping that someone in the community could provide any guidance (ie. ideas for further tests) to define my problem. I can provide further files if needed for troubleshooting.
Thanks in advance!
GooberBoy.
Sub Test_Menu () 'Macro used to create a menu to access scripts for all blood tests
'First Line hands Error catching over to the user (Lines such as Err.Number <> 0 means there was an internal error.) If a script isn't behaving as it is
'supposed to, comment out the first line and let it run. It should tell you which line is causing an error if it can find one.
On Error Resume Next
'An internet object is created and is assigned to navigate to the local html file that serves as a template for the Test menu
Set objExplorer = CreateObject("InternetExplorer.Application")
filePath = Doc.Path + "ScriptFiles\HTML\test Menu.htm"
objExplorer.Navigate "file:///" + filePath
'If objExplorer can not find the local html file, it is likely that the script file has not been created and so an error message is shown
if Err.Number <> 0 Then
call msgbox("Could not find Script files! Please be sure that the Script Files Folder is located " & chr(10) & " in the same folder and that this file has already been saved as a Data File")
objExplorer.Quit
Exit Sub
End if
'Formats the IE page for viewing on the computer
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 400
objExplorer.Height = 500
objExplorer.Left = 700
objExplorer.Top = 250
objExplorer.Visible = 1
'The following two lines help to ensure the IE page pops up (This two lines may not be necessary, but I have included them just in case
Set objShell = CreateObject("Wscript.Shell")
objShell.AppActivate objExplorer.Name
'While the IE page is up, the script checks every 0.25 seconds to see if either the OK button or cancel button is clicked
Do While (objExplorer.Document.Body.All.OKClicked.Value = "")
Call WaitFor(0,0,.25)
'Clicking the X-button creates an error, so this code ensures that the macro is exited when the x button is clicked
if Err.Number <> 0 then
ObjExplorer.Quit
exit sub
End if
Loop
'Whichever button was clicked is grabbed from the HTML file and stored to the response variable before then objExplorer object is removed
response = objExplorer.Document.Body.All.OKClicked.Value
objExplorer.Quit
if Err.Number <> 0 then exit sub
'Depending upon the response, the proper macro is called
Select Case response
Case "ACT"
Call Doc.Macros.ACT ()
Case "CG8"
Call Doc.Macros.CG8 ()
Case "CG4"
Call Doc.Macros.CG4 ()
Case "CHEM8"
Call Doc.Macros.Chem8 ()
Case "HEMOX"
Call Doc.Macros.HEMOX ()
Case "Glucose"
Call Doc.Macros.GLU ()
Case "PCV"
Call Doc.Macros.PCV ()
Case "OSMO"
Call Doc.Macros.Osmolarity ()
Case "Ultrasound"
Call Doc.Macros.Ultrasound()
Case "Cancelled"
Exit sub
Case Else
Exit Sub
End Select
End Sub
Our research institute is in the process of upgrading from Win7 to Win10 Enterprise. We use a digital data logging software (Labchart V7 by Adintruments) for which we have developed custom MACROS, based upon VBscript. The manufacturer cannot provide further support as we are using the MACROS well beyond what was intended for the program. Essentially, the VBscript MACROS call a document (HTML page from IE) to enable the user to either: (1) enter data which then writes back to a spreadsheet within the Labchart program (I call this a "one layer" MACRO, or (2) prompts the user for a selection, which then calls another VBscript MACRO for the user to enter data and write back to Labchart (I call this a "secondary or tiered" MACRO. This strategy was chosen to minimize the number of "buttons" on the GUI. An example would be "Blood Test" MACRO. When this is selected by user, a HTML page opens with a list of buttons to select for each of the types of blood tests.
The problem is with the "tiered" MACROS. They work in Win7 with a standard user logged in- it was necessary for our IS folks to modify IE security settings related to ActiveX and scriptlets to get things to work. On Windows 10, despite having the same IE security settings, I can only get the "tiered": MACROS to work is the Labchart program is run as administrator; "one layer" MACROS work fine for standard user. Our IS folks are hesitant to provide admin access to the various users in our team just to be able to make the program function in Win10.
Some additional information which may be useful. Upon starting the Labchart program, we run an initialize MACRO which sets up a folder in the users\public for the various HTML files which the lab chart program calls when running a MACRO. I have tried another local folder on computer and opened up access for that folder but no luck; thought it may have to do with Win10 read/write access to folder.
An example of a tiered MACRO is below. In Win10, when a button is selected, the secondary HTML page does not appear (nothing happens). I have checked that the docs are located in the directory; again, this works for Win7.Based upon my testing (and limited knowledge) I wonder if there is a Win10 or IE security setting which I cannot change to make MACROS function for standard user.
I am hoping that someone in the community could provide any guidance (ie. ideas for further tests) to define my problem. I can provide further files if needed for troubleshooting.
Thanks in advance!
GooberBoy.
Sub Test_Menu () 'Macro used to create a menu to access scripts for all blood tests
'First Line hands Error catching over to the user (Lines such as Err.Number <> 0 means there was an internal error.) If a script isn't behaving as it is
'supposed to, comment out the first line and let it run. It should tell you which line is causing an error if it can find one.
On Error Resume Next
'An internet object is created and is assigned to navigate to the local html file that serves as a template for the Test menu
Set objExplorer = CreateObject("InternetExplorer.Application")
filePath = Doc.Path + "ScriptFiles\HTML\test Menu.htm"
objExplorer.Navigate "file:///" + filePath
'If objExplorer can not find the local html file, it is likely that the script file has not been created and so an error message is shown
if Err.Number <> 0 Then
call msgbox("Could not find Script files! Please be sure that the Script Files Folder is located " & chr(10) & " in the same folder and that this file has already been saved as a Data File")
objExplorer.Quit
Exit Sub
End if
'Formats the IE page for viewing on the computer
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 400
objExplorer.Height = 500
objExplorer.Left = 700
objExplorer.Top = 250
objExplorer.Visible = 1
'The following two lines help to ensure the IE page pops up (This two lines may not be necessary, but I have included them just in case
Set objShell = CreateObject("Wscript.Shell")
objShell.AppActivate objExplorer.Name
'While the IE page is up, the script checks every 0.25 seconds to see if either the OK button or cancel button is clicked
Do While (objExplorer.Document.Body.All.OKClicked.Value = "")
Call WaitFor(0,0,.25)
'Clicking the X-button creates an error, so this code ensures that the macro is exited when the x button is clicked
if Err.Number <> 0 then
ObjExplorer.Quit
exit sub
End if
Loop
'Whichever button was clicked is grabbed from the HTML file and stored to the response variable before then objExplorer object is removed
response = objExplorer.Document.Body.All.OKClicked.Value
objExplorer.Quit
if Err.Number <> 0 then exit sub
'Depending upon the response, the proper macro is called
Select Case response
Case "ACT"
Call Doc.Macros.ACT ()
Case "CG8"
Call Doc.Macros.CG8 ()
Case "CG4"
Call Doc.Macros.CG4 ()
Case "CHEM8"
Call Doc.Macros.Chem8 ()
Case "HEMOX"
Call Doc.Macros.HEMOX ()
Case "Glucose"
Call Doc.Macros.GLU ()
Case "PCV"
Call Doc.Macros.PCV ()
Case "OSMO"
Call Doc.Macros.Osmolarity ()
Case "Ultrasound"
Call Doc.Macros.Ultrasound()
Case "Cancelled"
Exit sub
Case Else
Exit Sub
End Select
End Sub