Excel VBA

Anonymous
2020-12-18T13:28:11+00:00

Private Sub CommandButton1_Click()

TextBox1 = ""

TextBox2 = ""

TextBox3 = ""

TextBox4 = ""

obtml.Value = True

End Sub

Private Sub CommandButton2_Click()

'close the userform

Unload Me

End Sub

Private Sub Button4_Click()

If Obtm1.Value = True Then

TextBox1 = CStr(txttml.Value) * 15 / 100

End If

If obtm2.Value = True Then

TextBox2 = CStr(txttml.Value) * 35 / 100

End If

If obtm3.Value = True Then

TextBox3 = CStr(txttml.Value) * 25 / 100

End If

If obtm4.Value = True Then

TextBox4 = CStr(txttml.Value) * 15 / 100

End If

1 b1final.Caption = Val(txttml.Value) * 15 / 100 + Val(txttm2.Value) * 35 / 100 + Val(txttm3.Value) * 25 / 100 + Val(txttm4.Value)

End Sub

Private Sub CommandButton3_Click()

Range("b5").Value = Label1.Caption

End Sub

Private Sub Label1_Click()

End Sub

Private Sub Label2_Click()

End Sub

Private Sub Label3_Click()

End Sub

Private Sub Label5_Click()

End Sub

Private Sub TextBox1_Change()

'extension'

End Sub

Private Sub TextBox3_Change()

End Sub

Private Sub TextBox4_Change()

End Sub

Private Sub UserForm_Click()

End Sub

 what should I do if I want to calculate final mark

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. OssieMac 47,981 Reputation points Volunteer Moderator
    2020-12-20T23:17:43+00:00

    It is quite a time consuming effort to create a workbook as you have described and even then, it is possible to not have it exactly as per your workbook.

    Perhaps you can upload an example copy of your workbook to OneDrive. If you have sensitive data in the workbook then make a cooy and replace the sensitive data with dummy data. eg. Peoples names can be easily replaced with Name1, Name2 etc. 

    Guidelines to upload a workbook on OneDrive. (If you already use OneDrive and your process for saving to it is different then you can probably start at step 8 to get the link but please zip the file before uploading.)

    Sharing links to business OneDrive often does not work because the business has applied security measures that prevent this. Some people take a copy of the workbook home and upload from their private OneDrive.

    1. Zip your workbooks. Do not just save an unzipped workbook to OneDrive because the workbooks open with On-Line Excel and the limited functionality with the On-Line version causes problems.
    2. To Zip a file: In Windows Explorer Right click on the selected file and select Send to -> Compressed (zipped) folder). By holding the Ctrl key and left click once on each file, you can select multiple workbooks before right clicking over one of the selections to send to a compressed file and they will all be included into the one Zip file.
    3. Do not use 3rd party compression applications because I cannot unzip them. I do not clog up my computer with 3rd party apps when there are perfectly good apps supplied with windows.
    4. Go to this link.  https://onedrive.live.com
    5. Use the same login Id and Password that you use for this forum.
    6. Select Upload under the blue bar across the top and browse to the zipped folder to be uploaded.
    7. Select Open (or just double click). (Be patient and give it time to display the file after initially seeing the popup indicating it is done.)
    8. Right click the file name in OneDrive.
    9. Select Share.
    10. Click the link icon (Looks like chain links) at the bottom left of the dialog (Just above "Copy link").
    11. Click Copy button.
    12. Change back to this forum and click the "Insert Hyperlink" icon at top of the posting editor (Icon looks like chain links).
    13. Right click in the Web address field and right click and paste (or just Ctrl V to paste).
    14. Click "Insert" Button.
    1 person found this answer helpful.
    0 comments No comments