Consulting

Results 1 to 5 of 5

Thread: Solved: show very hidden

  1. #1

    Solved: show very hidden

    I have a form with a botton that when click it should show and let edit.
    note: the application is not visible and the sheet is veryhidden
    what appens is that it show but doen't let edit...


    [VBA]

    Private Sub CommandButton4_Click()
    Application.Visible = True
    Sheet2.Visible = xlSheetVisible
    Sheet2 = Focus
    End Sub
    [/VBA]

    thanks is adanced

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    It has to do with how you Show the Userform. Set the ShowModal property in the Userform or use the 2nd parameter of the Userform's Show method for vbModeless. e.g.

    [VBA]Userform1.Show vbModeless[/VBA]

  3. #3
    no, but as the excel is not visible tried
    [vba]
    Private Sub CommandButton4_Click()
    form_user_inicial_tecnica.Hide
    Application.Visible =
    True
    End Sub
    [/vba]

    and a macro to return to the begining with :

    [vba]
    Option Explicit

    Sub
    SaveDocument_e_voltar()
    Application.ActiveWorkbook.Save
    Application.Visible = False
    Module1.seccao
    End Sub
    [/vba]


    and is working fine

  4. #4
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    After all that, you need to Activate or Select the sheet and then Select a cell Range. e.g.
    [VBA]application.WindowState=xlNormal
    Sheet1.Activate
    Range("A1").Select[/VBA]

    Obviously, if the application has not be set to visible the window state is not set, the userform is modal, you will have those issues.

  5. #5
    thanks

    I have a thread still open with a need of solution, want to help in that
    thanks

Posting Permissions

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