Project Navigation
Welcome to a small series of blog posts, in which we are going to make a simple look up calculator with excel VBA to calculate the how much fabric would be needed for a garment. This may seem a little weird, but hang in there with me and hopefully we will learn together.
The goals for this project is to take specified user inputs, and return a user friendly information. I will also make note of some simple tricks that will be used to make this project look like an application from the users end when we are finished. And no promises but if I can figure it out, I hope to have the finished project downloadable at the end of this series for reference.
We are going to use the following reference sheet https://www.dummies.com/crafts/sewing/sewing-for-dummies-cheat-sheet/ this will give us the information for both the inputs and out puts we will need.
Next we must decide on the expected information from the user in order to get the out put. To do this we are going to section out two options, I have x fabric and want to make something, and I want to make x and need fabric.
Now we have the project basics outlined, we can get started making our project in excel. From the developers tab we are going to select Insert and from the second section we are going to place two active x buttons for the user to interact with on our main sheet.

From there we can edit the style, caption and programical name using the properties window

** excel uses the system color names instead of hex or RGB, we can get custom colors by using the intermediate window and the command ‘ print RGB() ’ in combination with any RBG values to return a number string that excel can convert automatically into the system color code that the properties window will take.

You can assign macros to buttons many different ways, for now from the sheet that we have built we will right click on the button and select ‘ View Code ‘ in order to access the visual basic editor and be able to start working on the back end of this calculator
This is the basic code editor for Excel

From here we can choose the structure of our project. For this project we will go ahead and create a simple structure consisting of two user forms that will be called upon by the main button clicks, and a module to hold our functions.

For our button clicks we want to ensure that there is some basic user controls, so we will nest our user form call in an if statement to check that the other user form isn’t currently open (visible), and if it is then we will use the Unload built in function to close the open user form, and show the corresponding user form to the users button click.

Now we can get to setting up our user form’s, we will do this in the next post, see you then!