) Sub Main() 'Turn off screen updating Application. Value, "Project List", 0)) Then 'Print to Immediate Window to check value - remove later Debug. Screen Updating = False 'Define variable for currently active cell to reactivate it afterwards Dim Old Active Sheet As Object Dim Old Active Cell As Object Dim i As Integer Dim Project List As Range Set Old Active Sheet = Active Sheet Set Old Active Cell = Active Cell 'If-statement to check whether project number is valid or not Worksheets("Invoice"). Sub Delete Blank Rows1() ' Deletes the entire row within the selection if the ENTIRE row contains no data. ' We use Long in case they have over 32,767 rows selected. Screen Updating = False ' We work backwards because we are deleting rows.
Screen Updating = True End With End Sub Sub Delete Blank Rows2() ' Deletes the entire row within the selection if _ some of the cells WITHIN THE SELECTION contain no data. You will learn the vocabulary to ask anything from Excel. Apply End Withwe offer you much more vocabulary to work with Excel databases and also many more simplified macros that can be used in all versions of Excel.After section 2 you will be able to develop small and useful macros and even very complex programs. You can you can copy/paste any of them into your own workbooks.procedure I want to write a quick if-statement which checks whether the user has made a valid input (user chooses number of project from list of data, see attached screenshot).For that I am checking whether the project number is not part of the list of projects.