Forum Discussion

PMHunt1955's avatar
PMHunt1955
Brass Contributor
Jun 24, 2019
Solved

Create a pop-up form for entering current 'block' of cells

I have a block of cells that I wish to enter at various points through my spreadsheet.   A couple of 'blocks' that I have already done 'manually' are as follows –   Father: Christophori Johns...
  • JKPieterse's avatar
    JKPieterse
    Jun 25, 2019

    PMHunt1955 Hi Philip, to start with your last question: if you click the Reply button rather than the "Quick reply" button and select the Rich Text tab at the top of the small reply window, you should see a button </>. Click that to insert code.

     

    To your other questions.

    Best to put both the OnKey routine and the routine that opens the form in a normal module:

    Sub ShowBaptismEntryForm()
        Enter_Baptism.Show
    End Sub
    
    Sub SetHotKey()
        Application.OnKey "+^b", "ShowBaptismEntryForm"
    End Sub
    
    Sub ResetHotKey()
        Application.OnKey "+^b"
    End Sub
    

    And in ThisWorkbook:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
       ResetHotKey
    End Sub
    
    Private Sub Workbook_Open()
        SetHotKey
    End Sub
    

     

     

     

Resources