- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Working with Excel, I have to use function or subroutine subprograms defined in EXCEL97A.f90 given with CVF.
However , this subroutines accept some arguments as Variant type. for instance, to give worksheet names to workbook or to select a sheet with its names like occuring at the worksheets_Select function.
Question is how I can convert my character strings to variant type arg?
Secondly, I don't know anything about VB or C languages.
Where can I find doc about this conversion?
Thank you
Regards
However , this subroutines accept some arguments as Variant type. for instance, to give worksheet names to workbook or to select a sheet with its names like occuring at the worksheets_Select function.
Question is how I can convert my character strings to variant type arg?
Secondly, I don't know anything about VB or C languages.
Where can I find doc about this conversion?
Thank you
Regards
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look at the AUTODICE example, which shows how to initialise, define and release a variant e.g.
HTH.
CALL VariantInit(vInt)
vInt%VT = VT_I4
vInt%VU%LONG_VAL = 11
CALL VariantInit(vBSTR1)
vBSTR1%VT = VT_BSTR
bstr1 = ConvertStringToBSTR("Dice Histogram")
vBSTR1%VU%PTR_VAL = bstr1
.....
.....
status = VariantClear(vBSTR1)HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tonyrichards,
Thank you very much for your reply.
I use the method shown at autodice sample in my program successfully.
But I tried the same method at
Worksheet_Select function for selection any sheet from workbook or WorkSheet_Add function for adding sheet before/after any sheet. It doesn't work.
If you have any idea, it is appreciated.
Regards
Thank you very much for your reply.
I use the method shown at autodice sample in my program successfully.
But I tried the same method at
Worksheet_Select function for selection any sheet from workbook or WorkSheet_Add function for adding sheet before/after any sheet. It doesn't work.
If you have any idea, it is appreciated.
Regards
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page