Welcome to the RAS Solution Forums HECRAS Controller HECRAS Controller as Public. How to close RAS?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8172
    PaoloP
    Participant

    In a VBA program I need to declare HECRAS Controller as Public, but at the end of the program the command .QuitRAS hide the RAS GUI but the program still run in background.
    I think this is due to the Public declaration, when I close the Excel file also the RAS is closed.
    Do you know how to close RAS in this case?

    Thaks Paolo

    #13496
    Chris G.
    Keymaster

    When you declare the HECRASController as public, RAS will remain open as an application outside the scope of a given procedure-QuitRAS only hides it. If you want RAS to close at the conclusion of the procedure, you have to declare the HECRASController within the scope of that procedure. Then at the end of the procedure, RAS will close as an application.

    It’s possible that you could find some third-party code to manually close RAS as an application. I suggest Googling “vba close an application” and see if you can find a way. If you do, please share with the group.

    Thanks-
    Chris

    #13497
    PaoloP
    Participant

    Thanks Chris, I googled and I found this:

    to close (or open) an APP see:
    http://www.taltech.com/support/entry/opening_and_closing_an_application_from_vba

    but I discovered that closing RAS the APP doesn’t work for a second RUN (I guess it is linked with public declaration of HECRAS Controller)

    For this reason I decided to close Excel at the end of the run, to do this see:

    http://stackoverflow.com/questions/3628252/closing-excel-application-using-vba

    Paolo

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.