Excel VBA Calculations in a Userform

  Рет қаралды 104,225

Online Pc Learning

Online Pc Learning

9 жыл бұрын

www.onlinepclearning.com
Excel VBA Userform with Calculations in a Userform. In this tutorial I will demonstrate how to use Vlookup and Calculations in a Userform. We are able to calculate varying percentages and markups for a list of products.

Пікірлер: 26
@lordsalisbury1
@lordsalisbury1 8 жыл бұрын
Great video bro, seriously, thanks.
@akabanekarma3246
@akabanekarma3246 6 жыл бұрын
Please help, I have a problem while running the code. The cost per Kg and the markup won't show :/
@saeedalikhan7128
@saeedalikhan7128 8 жыл бұрын
thanks sir
@mickaelacanites8382
@mickaelacanites8382 4 жыл бұрын
how did you do the "click the userform"?
@WaresHadi
@WaresHadi Жыл бұрын
Thanks for uploading the video. Sir, as we are using "txt" as a predecessor for Textbox. In a similar way, we may use "cmb" as a predecessor for ComboBox instead of "cmd". Best regards.
@unitedworldcare9497
@unitedworldcare9497 4 жыл бұрын
Thank you Sir
@tekd6251
@tekd6251 9 жыл бұрын
How to do if the userform and data entered is in different sheet.
@harithabdullah5833
@harithabdullah5833 3 жыл бұрын
use the macros and name range. i just learnt it from his other videos :D
@nammarcr33737
@nammarcr33737 5 жыл бұрын
Dear sir will you create a video for Billing userform with calculation in vba userform USERFORM Products|Qty|Weight|Rate|Amount| Steelrod || 10 ||103| 45perkG||4635 After this database transfer in excel sheet
@balasaravanan5174
@balasaravanan5174 8 жыл бұрын
hello sir., i have one doubt. pls clear it in excel vba form. There are three check box button if first button is checked then the value of cell is multiply by one, if second button is checked then the value of cell is multiply by two, if third button is checked then the value of cell is multiply by three. What is the code. pls clear
@bassisessaidexcel
@bassisessaidexcel 4 жыл бұрын
Merci
@niphaphatr1
@niphaphatr1 4 жыл бұрын
Thangk you so much
@ahmetyigit6251
@ahmetyigit6251 4 жыл бұрын
Hii if u do this file or have, could u please share with me ?
@commoditycontrolserviceslt6655
@commoditycontrolserviceslt6655 2 ай бұрын
Sir, Thank you very much. I found your site is down. It'll be great If I get this file or code. Plz
@commoditycontrolserviceslt6655
@commoditycontrolserviceslt6655 2 ай бұрын
I've made this. If anyone needs it, Just knock me. Thanks. Code below: Option Explicit Private Sub cmdAdd_click() Dim nextrow As Range 'check for values If Me.cmdProducts.Value = "" Or Me.txtQuantity.Value = "" Then MsgBox "Please add the porduct quantity" Exit Sub End If 'find the next blank row Set nextrow = Sheet1.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0) 'send the data to the database With nextrow .Value = Me.cmdProducts.Value .Offset(0, 1).Value = Me.txtQuantity.Value .Offset(0, 2).Value = Me.txtKg.Value .Offset(0, 3).Value = Me.txtPercent.Value .Offset(0, 4).Value = Me.txtMarkup.Value .Offset(0, 5).Value = Me.txtTotal.Value End With 'update the worksheet Application.ScreenUpdating = True 'clear the values With Me .cmdProducts.Value = "" .txtQuantity.Value = "" .txtKg.Value = "" .txtPercent.Value = "" .txtMarkup.Value = "" .txtTotal.Value = "" End With 'give the user the thumbs up MsgBox "The data has been sent to the database" End Sub Private Sub cmdClose_click() 'close the userform Unload Me End Sub Private Sub cmdProducts_Change() 'clear the value if the products change With Me .txtQuantity.Value = "" .txtKg.Value = "" .txtPercent.Value = "" .txtMarkup.Value = "" .txtTotal.Value = "" End With End Sub Private Sub txtQuantity_AfterUpdate() 'check fo values and datatype If Not IsNumeric(Me.txtQuantity.Value) Or Me.cmdProducts = "" Then MsgBox "Number Input Only" Me.txtQuantity.Value = "" Exit Sub End If 'send the values to the worksheet With Sheet1 .Range("M5").Value = Me.cmdProducts.Value .Range("N5").Value = Me.txtQuantity.Value End With 'retrieve the results With Me .txtKg.Value = Sheet1.Range("O5").Value .txtKg.Value = Format(Me.txtKg.Value, "$#,##0.00") .txtPercent.Value = Sheet1.Range("P5").Value .txtPercent.Value = Format(Val(Me.txtPercent.Value) * 100, "0:00%") .txtMarkup.Value = Sheet1.Range("Q5").Value .txtMarkup.Value = Format(Me.txtMarkup.Value, "$#,##0.00") .txtTotal.Value = Sheet1.Range("R5").Value .txtTotal.Value = Format(Me.txtTotal.Value, "$#,##0.00") End With End Sub Private Sub UserForm_Click() End Sub
@newstudent3397
@newstudent3397 2 жыл бұрын
great stuff. I am trying to adapt code to different set of data with not a lot of progress. Why do you use "Me." before each data element...such as "Me.txtresults.value"
@jonnathanjon1
@jonnathanjon1 Жыл бұрын
Are you from nsw?
@mikeymirabelli
@mikeymirabelli 7 жыл бұрын
Hello, can you send me this xlsm file?
@mikeymirabelli
@mikeymirabelli 7 жыл бұрын
mikemirabelli6@hotmail.com
@ahmetyigit6251
@ahmetyigit6251 4 жыл бұрын
@@mikeymirabelli Hi did u get this file? Could u please share with me? Thank u very much
@commoditycontrolserviceslt6655
@commoditycontrolserviceslt6655 2 ай бұрын
@@ahmetyigit6251 Hi, If you get plz send me also. plz plz and thanks.
@Ahanssss
@Ahanssss 7 жыл бұрын
Hi i need help in my VBA, is it possible if i could send you my codes? Thanks
@dbasannar
@dbasannar 2 ай бұрын
If the complete code needs to be shown
@dbasannar
@dbasannar 2 ай бұрын
youtube audio quality is poor
Userform Calculations in Excel VBA - Calculator Userform
14:16
Excel Destination
Рет қаралды 89 М.
Excel VBA Userform with Vlookup
8:43
Online Pc Learning
Рет қаралды 332 М.
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 18 МЛН
Самый Молодой Актёр Без Оскара 😂
00:13
Глеб Рандалайнен
Рет қаралды 7 МЛН
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 160 МЛН
User Forms 3: Calculations
4:02
LearnChemE
Рет қаралды 94 М.
SUM of two or more Textboxes and Tricks to Automate This - Excel VBA
20:30
Employee Pictures in a Userform
12:15
Online Pc Learning
Рет қаралды 45 М.
Auto fit a VBA User form in window screen
10:27
PK: An Excel Expert
Рет қаралды 146 М.
How to Get Data from Worksheet into User Form Combox and Text Boxes with VBA
5:09
Edit and Delete from a Userform
9:53
Online Pc Learning
Рет қаралды 69 М.
Advanced Filter for Any Column in a Database
12:13
Online Pc Learning
Рет қаралды 40 М.
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 18 МЛН