Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Error at $WorkSheet_Select Function

selahattin
Beginner
499 Views
I wrote folowing code to select one of sheet in the Excel workbook, but I got "Severe Error(157) , Programing Exception, Access Violation" Message.
I couldn't find where y made mistake.
Is there anybody to help me, please?

status = VariantClear(vBSTR1)
bstr1 = 0

vInt%VT = VT_I4
vInt%VU%LONG_VAL = 1
CALL VariantInit(vBSTR1)
vBSTR1%VT = VT_BSTR
bstr1 = ConvertStringToBSTR("ABCD")
! "ABCD" is name of worksheet to be selected.
vBSTR1%VU%PTR_VAL = bstr1
call $Worksheet_Select(worksheet,vBSTR1,$status=status)
0 Kudos
0 Replies
Reply