Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA summarize
Dear Sirs/Madams of this group,
I am slightly new to VBA programming in Excel and i'm working on a project. I'm stumped on the code which i would write to summarize what i have entered into my worksheet via a userform. Could somebody please help me with any kind of instructions on how i could summarize what i have entered by placing all the variables into a message box. For eg. i'm entering the details of a trade, and i want it to confirm for me that the details i entered are correct by displaying them in a msgbox form. Your suggestions will be greatly appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA summarize
Some sources of information:
http://support.microsoft.com/default.aspx?kbid=161514 XL97: How to Use a UserForm for Entering Data http://support.microsoft.com/default.aspx?kbid=213749 XL2000: How to Use a UserForm for Entering Data http://support.microsoft.com/?id=168067 XL97: WE1163: "Visual Basic Examples for Controlling UserForms" Microsoft(R) Visual Basic(R) for Applications Examples for Controlling UserForms in Microsoft Excel 97 This Application Note is an introduction to manipulating UserForms in Microsoft Excel 97. It includes examples and Microsoft Visual Basic for Applications macros that show you how to take advantage of the capabilities of UserForms and use each of the ActiveX controls that are available for UserForms http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm Lesson 11: Creating a Custom Form Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step. John Walkenbach's site: http://j-walk.com/ss/excel/tips/userformtips.htm Userform Tips Peter Aiken Articles: watch word wrap. the URL should all be one line. Part I http://msdn.microsoft.com/library/en...uctiontoUserFo rmsPartI.asp Part II http://msdn.microsoft.com/library/en...uctiontoUserFo rmsPartII.asp -- Regards, Tom Ogilvy Dorian T wrote in message om... Dear Sirs/Madams of this group, I am slightly new to VBA programming in Excel and i'm working on a project. I'm stumped on the code which i would write to summarize what i have entered into my worksheet via a userform. Could somebody please help me with any kind of instructions on how i could summarize what i have entered by placing all the variables into a message box. For eg. i'm entering the details of a trade, and i want it to confirm for me that the details i entered are correct by displaying them in a msgbox form. Your suggestions will be greatly appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA summarize
-----Original Message----- Dear Sirs/Madams of this group, I am slightly new to VBA programming in Excel and i'm working on a project. I'm stumped on the code which i would write to summarize what i have entered into my worksheet via a userform. Could somebody please help me with any kind of instructions on how i could summarize what i have entered by placing all the variables into a message box. For eg. i'm entering the details of a trade, and i want it to confirm for me that the details i entered are correct by displaying them in a msgbox form. Your suggestions will be greatly appreciated. . I'm pretty new at this stuff too. If I'm understanding your question correctly, here are a couple of samples of what I have used. The first simply shows a Message Box with 2 lines of text. CHR(103) and CHR(10) being a carriage return and a line feed. If ComboBox15.Value = "" Then mbResponse1 = MsgBox("No play date has been selected." & Chr(13) & Chr(10) & " You must select a date before pressing the ACCEPT button!", vbOKCancel) End If This example starts with an Input Box. I'm entering the data and if that value is 999, then go through and enter individual scores for each game through the use of an Input Box for each. After entering all the data, I've put the results into a MsgBox at the end of the code. As you can see, I have joined all the information to be put into the MsgBox into the variable, aveResult. newAve = InputBox("Enter starting average. If none, enter 999.") aveStart = newAve If newAve = 999 Then Message = "Enter 1st game score for " + newName newGame1 = InputBox(Message, , , 5000, 3000) Message = "Enter 2nd game score for " + newName newGame2 = InputBox(Message, , , 5000, 3300) Message = "Enter 3rd game score for " + newName newGame3 = InputBox(Message, , , 5000, 3600) aveStart = Int(Val(newGame1) + Val(newGame2) + Val (newGame3)) / 3 aveResult = "Starting average for " & newName & " will be " & Int(aveStart) & "." Response = MsgBox(aveResult) End If You should be able to just paste this code into a module to try it out to see what is looks like and if it's what you are looking for. You can certainly put the values of particular cells in place of variables defined in VBA code. When you are working on your code, if you move your cursor over the InputBox or MsgBox and press the F1 key, you should get some good help information to show you how to position the box or what type of buttons you want to show, etc. It worked for me anyway! Hope this helps! Regards, speedking1621 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Summarize data | Excel Discussion (Misc queries) | |||
Cant summarize nrs like 15.200,00 | Excel Discussion (Misc queries) | |||
Looking for a way to summarize data? | Excel Worksheet Functions | |||
summarize | New Users to Excel | |||
Summarize Data | Excel Discussion (Misc queries) |