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

Selection Different Sheets at the Excel

selahattin
Beginner
717 Views
I want to read data from different sheets instead of ActiveSheet at the excel application, so I need to select any sheet named by me.
I tried to use $Worksheet_Select function but I it didn't work. I think I made mistake while giving the arguments.
Is there anybody to show a brief code for this at the this Fortran Forum?
0 Kudos
3 Replies
durisinm
Novice
717 Views
The Excel VBA statements:

Worksheets(Sheet1_name).Activate
Worksheets(Sheet1_name).Select

will activate and select a sheet. The value in parentheses can be either numeric or a character string. Once the sheet is selected, the Worksheet_Select function for that sheet is automatically invoked.

Mike
0 Kudos
selahattin
Beginner
717 Views
Thanks for your reply, but my question is a little bit different.
The statements you gave are for Excel Macro.
I want to select and activate sheets from Fortran, not from excel macro/Visual Basic Editor.
0 Kudos
shailendra_singh
Beginner
717 Views
Hi,
I am facing similar situation, and wonder if u could help me. I have to read data from an excel sheet, and after all the calculation, the result data has to be stored on different sheets of excel file.
I compiled and executed AUTODICE, but because of my limted awareness in COM programming, I am not able to modify it according to my requirements.

Hope you can help me.
Thanks in advance.
0 Kudos
Reply