Consulting

Results 1 to 11 of 11

Thread: Switch between Putty and Xshell using same Loginbutton

  1. #1

    Switch between Putty and Xshell using same Loginbutton

    Hi team,
    I created userform vba to login in to 2 server using putty with one loginbutton ,


    Sub puttyserver1

    pcmd = Dutty serverip -l demo -pw pass
    '
    End Sub


    Sub puttyserver2
    '
    pcmd = Dutty serverip -l demo -pw pass
    '
    End Sub


    ---------------------------------------------------------------------------------------------------------------------------


    I want to login to same server but with Xshell with same loginbutton using combobox (to select between Putty and Xshell)
    or anything else which can work with userform vba.

    Need to call Sub puttyserver1/Xshellserver1 depending upon combobox selection with same loginbutton.


    Sub Xshellserver1
    '
    '
    pcmd = Xshell -newwin ssh
    '
    '
    End Sub


    Sub Xshellserver2
    '
    pcmd = Xshell -newwin ssh
    '
    End Sub






    Any help appreciated

  2. #2
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    Hi ganesh!
    Welcome to vbax forum.
    Maybe "Application.Run" can fulfill your requirements.

  3. #3
    Quote Originally Posted by 大灰狼1976 View Post
    Hi ganesh!
    Welcome to vbax forum.
    Maybe "Application.Run" can fulfill your requirements.
    Thanks for reply , but can u explain how can i use "Application.Run" please with an example
    Last edited by ganesh_6663; 04-03-2019 at 10:19 AM.

  4. #4
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    I will post a simple example later.

  5. #5
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    Just a simple example.
    Attached Files Attached Files

  6. #6
    Quote Originally Posted by 大灰狼1976 View Post
    Just a simple example.
    Thank you so much its really work for me. .
    but his macro problem is , don't need "server no" ComboBox , instead of that need command button.



    Image and file attached for ur reference .
    https://pasteboard.co/I8wNZ1T.jpg
    Attached Files Attached Files

  7. #7
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    Please refer to the attachment.
    Attached Files Attached Files

  8. #8
    Quote Originally Posted by 大灰狼1976 View Post
    Please refer to the attachment.

    Wow your legend, its works!!!!
    Thank you sooooo much for your help and time given for me

  9. #9
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    You're welcome

  10. #10
    VBAX Mentor
    Joined
    Apr 2009
    Location
    Kingsbury
    Posts
    423
    Location
    crossposted https://www.excelforum.com/excel-programming-vba-macros/1271063-switch-between-putty-and-xshell-using-same-loginbutton.html
    Please read rules on cross posting

  11. #11
    Quote Originally Posted by Rob342 View Post
    crossposted https://www.excelforum.com/excel-programming-vba-macros/1271063-switch-between-putty-and-xshell-using-same-loginbutton.html
    Please read rules on cross posting
    Yes , i will take care this next time.
    mark as solved on excelforum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •