I have 2 forms created for an excel 2013 spreadsheet to use for input of data. One button works, but the other gives me a "Run-time error '424': Object required" message. I have the 2 buttons on a worksheet named "CAPAR Entry". The data is input to a worksheet named "CAPAR listing". I have used the same code for both buttons other than changing the form names. Here is the code:
Sub CAPARInput() ' 'CAPAR Entry Macro ' 'Macro designed to call up a user form for gather data and 'updating the CAPAR data ' 'turn off screen updating and cell calculations for faster processing Application.ScreenUpdating = False Application.Calculation = xlCalculateManual 'clear and bring up sort data entry form 'bulk of the macro work is internal to sortform Unload CAPARResponseForm CAPARResponseForm.Show 'return to input worksheet Sheets("CAPAR Entry").Select 'turn screen updating and autocalculations back on prior to ending macro 'does not enable calulations for sheet disabled by workbook open macro Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic End Sub
The error highlights "CAPARResponseForm.Show". My form name is "CAPARResponseForm", so I don't have a spelling error. I am a novice at vba and cannot determine why my macro doesn't work.