Excel Bangla VBA 60: How to transfer data from a user form to multiple worksheets in Excel using VBA

Опубликовано: 29 Апрель 2026
на канале: HASAN ACADEMY
9,838
194

#HasanAcademy #ExcelBanglaTutorial #VbaBanglaTutorial


To transfer data from a Userform to multiple worksheets in Excel using VBA, you can use the following code:

VBA
Copy code
Private Sub TransferDataButton_Click()
'Transfer data from Userform to Worksheets
Dim dataValue As Variant
Dim dataRange As Range

'Assuming the data in the Userform is stored in a control with a name of "DataTextbox"
dataValue = DataTextbox.Value

'Assuming the data in each worksheet should be stored in a range named "DataRange"
Set dataRange = ThisWorkbook.Worksheets("Sheet1").Range("DataRange")
dataRange.Value = dataValue

Set dataRange = ThisWorkbook.Worksheets("Sheet2").Range("DataRange")
dataRange.Value = dataValue

Set dataRange = ThisWorkbook.Worksheets("Sheet3").Range("DataRange")
dataRange.Value = dataValue

'Clear the Userform
DataTextbox.Value = ""

'Close the Userform
Me.Hide
End Sub
This code assumes that the data in the Userform is stored in a control with a name of "DataTextbox", and the data in each worksheet should be stored in a range named "DataRange". You will need to modify the code to fit your specific Userform and worksheet structure. Note that this code sets the data in the same range in each worksheet. If you need to set the data in different ranges in each worksheet, you will need to modify the code accordingly.






Multiple Userform part-1
   • Excel VBA Bangla Tutorial 59 : Multi Pages...  
Multiple Userform part-2
   • Excel Bangla VBA 60: How to transfer data ...  
Multiple Userform part-3
   • Excel VBA Bangla 61 : Multi Page Userform ...  
Multiple Userform part-4
   • How to make a data entry form in excel wit...  


Most of the people is think about that how I will learn .But they didn't get any idea & trustworthy source. Don't hesitated Hasan Academy with you. You will learn from here, Excel, Excel Chart, Pivot Table, Vlookup, Formula function