1 Attachment(s)
Prev Button and Transfering Form Code
I have attached a spreadsheet which contains two Forms, userQuestions and userDocform. At Present when You Run the userQuestions form and answer question 2 as Yes. You will view the document copy. The problem is this, When you Click On Cancel on this form it actually moves to the next question in the list. I actually need it to Revert to the Prev Question. i.e Same Functionality as the Prev button on the userQuestions form.
I'm wondering how to do this? Would I need to re-declare all the variables as public and approach it that way, or maybe a macro would suffice?
I've attached the Code to the current version of the Prev Button As below.
Code:
If m_QID = 1 Then
m_QID = 1
CmdPrevQuestion.Enabled = False
Else
m_QID = QID_Prev(m_Question)
Call Delete_LastRow
Call Question_load
CmdPrevQuestion.Enabled = True
End If
Function Delete_LastRow()
Application.ScreenUpdating = False
Dim LastRow As Long
LastRow = Sheets("output").Range("A" & Rows.Count).End(xlUp).row
Sheets("output").Rows(LastRow).Delete
Application.ScreenUpdating = True
End Function