VBA Notes:
Below are the two lines you will need to make
your dialog-box work:
To make the dialog box pop-up automatically when you open the workbook make sure you name the following Macro Auto_Open().
Sub Auto_Open()
Sheets("THE_NAME_OF_SHEET_YOU_WANT_TO_BE_SHOWN").Select
THE_NAME_OF_DIALOG_BOX.Show
End Sub
To link an Edit Box to a cell you have to create the following VB subroutine:
Sub NAME_OF_MACRO_HERE()
Range("NAME_OF_RANGE_LIKE_HEIGHT_OF_BUILDING").Value = NAME_OF_EDIT_BOX.Value
End Sub
In the lecture I refer to this type of subroutine (above) as a "One Liner". The subroutine later receives an additional line to update the smart labels. After that I refer to this type of subroutine as a "two liner".
If we would have not used named ranges (which would be a mistake in this project!) the subroutine would be:
Sub NAME_OF_MACRO_HERE()
Sheets("THE_NAME_OF_CALCULATION_SHEET").Range("NAME_OF_RANGE_LIKE_B3").Value = NAME_OF_EDIT_BOX.Value
End Sub
Pay attention to the dots!
The subroutine that updates the smart labels will have five command lines, one for each smart label (output). Below I show only one command line.
Sub NAME_OF_MACRO_HERE()
NAME_OF_SMART_LABEL.Caption = Range("NAME_OF_RANGE_LIKE_BOOM_LENGTH").Text
End Sub
IF( ISERROR( NAME_OF_RANGE_LIKE_HEIGHT_OF_BUILDING ) , 0 , NAME_OF_RANGE_LIKE_HEIGHT_OF_BUILDING )
Note that in the VBA area the names of the ranges are in quote marks while in the ISERROR function in Excel the range name is not in quote marks.