Superb Aindril - Hats Off !!! Keep enjoying the queries :)
Regards Ashish Jain Developer of OpenXL -------------------------------------------------------------------- On Apr 27, 3:39 pm, Aindril De <aind...@gmail.com> wrote: > Hi Paresh, > > 1. 1st open a new workbook, Alt+F11 go to vba editor, on the left side, > right click on a icon and choose insert userform, when click on this > userform toolbox of controls appear, click the textbox button and click and > drag a rectangle on the userform to create an entry box, create another > textbox just underneath the 1st one. > 2. click on the commandbutton on the toolbox, click and drag a rectangle to > create a button on the userform, make another four for each of the > calculation sign, > 3. click on the label button on the toolbox, click and drag a rectangle to > create a button on the userform, that would be for the displaying the result > 4. click on each of the button, go to the properties window on button > left(F4 to open if not already there), change the value right of caption to > +, -, x, / respectively for 4 buttons > 5. click on the label, go to properties and delete the value in right of > caption, change the background color of this label(if like) by clicking on > box right of Backcolor, palette, > 6. right click on each of the calculation sign button, > for + put the following into the "Private sub CommandButton Click()" and > "End Sub" > Label1.Caption = TextBox1.Value * 1 + TextBox2.Value * 1 > for - put the following into the "Private sub CommandButton Click()" and > "End Sub" > Label1.Caption = TextBox1.Value - TextBox2.Value > for x put the following into the "Private sub CommandButton Click()" and > "End Sub" > Label1.Caption = TextBox1.Value * TextBox2.Value > for / put the following into the "Private sub CommandButton Click()" and > "End Sub" > Label1.Caption = TextBox1.Value / TextBox2.Value > 7. if you want to add feature to it like only calculate when both textbox > have number add following line to each of the 4 sub > If TextBox1.Value = "" Or TextBox2.Value = "" Then Exit Sub > Hope the above helps, > > Regards, > Andy > > On Mon, Apr 27, 2009 at 10:14 AM, Paresh Gugale > <paresh.g.2...@gmail.com>wrote: > > > > > Please give me program which can add/subtract/multiply/divide numbers > > in macros. > > > Regards > > Paresh --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---