I am unsure about how to use some of the features in the Workbook_Close subroutine of the COM interface that is generated by the Fortran Module Wizard. Specifically, the subroutine is defined as: SUBROUTINE $Workbook_Close($OBJECT, SaveChanges, Filename, RouteWorkbook, $STATUS) I would like to set the SaveChages variable to false. I think that this will avoid an Excel prompt that asks whether I would like to save changes to an excel file each time I access it from Fortran. The SaveChanges variable is defined as: TYPE (VARIANT), INTENT(IN), OPTIONAL :: SaveChanges I realise that I should add code into my mainprogram that sets up a pointer, but am unsure what this code should be. The AutoDice example indicates that the following code should be used in relation to a string variant: vBSTR1%VT = VT_BSTR bstr1 = ConvertStringToBSTR("A2") vBSTR1%VU%PTR_VAL = bstr1 Unfortunately, I suspect that the SaveChanges variable should be defined as a logical, and I have been unable to find an example of how to code this up. Many thanks in advance for any help.
For more complete information about compiler optimizations, see our Optimization Notice.