I need help with VBA/macro script to collect user input and fill cells

MAP

Active Member
Joined
Mar 22, 2007
Messages
315
Office Version
  1. 2007
Platform
  1. Windows
Hello Excel experts. I am still a novice using Excel 2003. I need help from the experts with a VBA/macro script that will start with continuously ask user for inputs until a "stop button" is pressed to end the loop and display the list generated. the script will ask the user for [1]the date ( the default would be today's date, but user can over-type a different date); [2]the time (inputed as a number for efficiency, eg 1330, which the script should convert to 01:30 PM); [3]an email address; [4]a category name from a list of four choices (SD, SP, RD, RP); [5]a name1 (the default would be XYZ, but the user can over-type a different name); [6] a name2; [7] a message1; [8] a message2

Every time the user enters all the information in the eight fields, the script would find the last completed row in the worksheet and enter the the most recently entered data into the empty row below the last entered row: [1 date] would be placed in column A; the [2 time] would be converted from the number value to a time format 1400 -> 02:00 PM and placed in column B; the [3 email] placed in column C; [4 category] to column D; [5 name1] to column E; [6 name2] to column F; [7 message1] to column G; and [8 message2] to column H

There should be a "stop" button after the last field. If user does not press "stop" then script would start again asking user for the next set of data. If the "stop" button is pressed, the script ends and displays the worksheet with all the entered information.

It will be a bonus if the script automatically saves the worksheet after each row has been entered.

I am a novice still learning the intricacies of the formulas used in Excel 2003, so I will greatly appreciate the assistance of the Excel experts for help with the VBA/macro script.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hello Excel experts. I am still a novice using Excel 2003. I need help from the experts with a VBA/macro script that will start with continuously ask user for inputs until a "stop button" is pressed to end the loop and display the list generated. the script will ask the user for [1]the date ( the default would be today's date, but user can over-type a different date); [2]the time (inputed as a number for efficiency, eg 1330, which the script should convert to 01:30 PM); [3]an email address; [4]a category name from a list of four choices (SD, SP, RD, RP); [5]a name1 (the default would be XYZ, but the user can over-type a different name); [6] a name2; [7] a message1; [8] a message2

Every time the user enters all the information in the eight fields, the script would find the last completed row in the worksheet and enter the the most recently entered data into the empty row below the last entered row: [1 date] would be placed in column A; the [2 time] would be converted from the number value to a time format 1400 -> 02:00 PM and placed in column B; the [3 email] placed in column C; [4 category] to column D; [5 name1] to column E; [6 name2] to column F; [7 message1] to column G; and [8 message2] to column H

There should be a "stop" button after the last field. If user does not press "stop" then script would start again asking user for the next set of data. If the "stop" button is pressed, the script ends and displays the worksheet with all the entered information.

It will be a bonus if the script automatically saves the worksheet after each row has been entered.

I am a novice still learning the intricacies of the formulas used in Excel 2003, so I will greatly appreciate the assistance of the Excel experts for help with the VBA/macro script.
I will appreciate help from any Excel expert
 
Upvote 0
Your profile shows that you are using Office 2007 not Excel 2003. Please clarify. If you are using 2007, a userform could probably do what you want. It might work with Excel 2003, but I'm not sure. However, I think that it would be easier to help and test possible solutions if I could work with your actual file. Perhaps you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.
 
Upvote 0
Your profile shows that you are using Office 2007 not Excel 2003. Please clarify. If you are using 2007, a userform could probably do what you want. It might work with Excel 2003, but I'm not sure. However, I think that it would be easier to help and test possible solutions if I could work with your actual file. Perhaps you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.
Thank you, @mumps , for your response. Pardon me for any confusion with the Excel version.. I tend to work mostly with Excel 2003. The userform for 2007 seems intriguing.

As for your suggestion of sharing an actual file, I will try to upload a worksheet that would show the intended output... However, since I want the VBA/macro to attract the user to input the data, I do not have any information to offer, except maybe the names of the "fields" and where that information should be inserted in which column.

Please.pardon my sloppy attempt to explain.
 
Upvote 0
Names of the "fields" and where that information should be inserted in which column would be fine. You can also enter some dummy data.
 
Upvote 0

Forum statistics

Threads
1,224,809
Messages
6,181,075
Members
453,020
Latest member
mattg2448

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top