Project 3 – Week 4 (Day 1) – What I Did Today – VBA

I mainly focused on the Userform and such ( things to do with VBA). Not much accomplished.

We started off the period with VBA handouts (printed from a website), which shifted my attention from formatting to VBA (I figured since pretty much the whole class was doing it, I should do it to be able to get some help on it ). The handouts have been pretty helpful, although, they don’t take into account that other people who use the help site may ACTUALLY want to customize their Userform as their own, so I had to rename a lot of the properties and think everything through.

After a bit of tinkering, I finally figured out how the transferring of data from the Userform to the Customer Info page works.

The Selected Area's name

So basically, you make sure you have the correct name, and then you edit via VBA.

VBA Submit Button

This is found when I edit the Submit button (the command button that sends all the info to my Customer Info Sheet).

Using some basic VBA programming language, I add in the name of the sheet, the range, and the names of the textboxes that contains the data that I want transferred to. Notice the UserForm4.Hide. UserForm4 is the name of the userform I am editing. The .Hide will hide the Userform once the submit button has been clicked, to signify that the info has been sent.

Then, once you actually fill in the Userform, it appears neatly like this:

What it looks like

Then, I tried to look for a way to make it so that when I use the Userform repeatedly, the data would always move down to the next cell (it would do this by checking if the above cell was filled or not), but eventually, I found out that it was there on the handout and I can just petty much copy and paste the code into my project, and then rename the certain parts that need to be changed.

One thing I moved on to after this was connecting the Userform with the bookings button.

This was quite difficult, quite simply because what I was attempting was mildly more difficult than my other ideas.

I wanted to make it so that if I click the bookings button for either Adult, Student or Senior, the Userform would come up. This was confusing for me as it involved sub buttons (I think). I still haven’t quite figured it out yet. Not sure if I should scrap the idea.

Overall, not much progress today. I have a lot of catching up to do, not only with VBA. I still have to finish up the layouts and formatting of the other Sheets.

About jaoj2

Sha Tin College 10S
This entry was posted in Project 3 - Rockschool Excel Project, Projects, What I Did Today. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s